﻿var initLoader = {
	
	/*** 公共预加载 START ***/
	
	//*************************************
	//* 公共 -> 图片上传
	//*************************************
	picUploadFunction : function(url, requestJson, selectFn, completeFn, allCompleteFn, queueSize, ext){
		var multi = true, fileExt = "", fileDesc = "", ifAllSuccess = true, queueIDArray = new Array();
		!queueSize ? queueSize = 50 : (queueSize == 1 ? multi = false : multi = true);
		if(ext){
			for(var i = 0; i < ext.length; i++){
				fileExt += (i == 0 ? "*." : ";*.") + ext[i];
				fileDesc += (i == 0 ? "." : ",.") + ext[i];
			}
			fileDesc += "文件";
		}else{
			fileExt = "*.jpg;*.gif;*.png";
			fileDesc = ".jpg,.gif,.png文件";
		}
		$('#uploadify').uploadify({
			'uploader':'../swf/uploadify.swf',
			'cancelImg':'../images/uploadify_cancel.png',
			'method': 'get',//提交方式，默认是POST
			'script': url,//后台处理程序的相对路径
			'scriptData': requestJson,//传参数(method 为 get 时有效)
			'queueID': 'uploadPanel',
			'buttonText': 'SELECT FILE',//选择文件按钮文字
			'hideButton': false,//是否隐藏选择文件按钮，默认为false
			'queueSizeLimit': queueSize,//设置最多上传文件个数
			'sizeLimit': 5120000,//允许文件上传大小( 单位：KB)
			'auto':true,//是否立即上传
			'fileExt': fileExt,//设置文件上传格式
			'fileDesc': fileDesc,//设置文件上传格式显示文字
			'removeCompleted':false,
			'multi': multi, //是否可以上传多个文件
			'onError': function (event, queueID ,fileObj, errorObj) {
				var msg;
				if (errorObj.status == 404) {
					msg = 'Could not find upload script.';
				} else if (errorObj.type === "File Size") {
					msg = '[' + fileObj.name + ']' + errorObj.type + ' Limit: ' + Math.round(errorObj.sizeLimit / 1024) + 'KB';
				} else {
					msg = errorObj.type + ": " + errorObj.info;
				}
				look.showInfo.error(msg);
				return false;
			},
			'onSelect' : function(event, queueID, fileObj) {
				selectFn ? selectFn() : null;
			},
			'onProgress' : function(event, queueId, fileObj, data){
			},
			'onComplete': function(event, queueId, fileObj, response, data){
				if(response.code != 0){
					ifAllSuccess = false;
				}
				completeFn && response ? completeFn(JSON.parse(response)) : null;
			},
			'onAllComplete': function (event, data){//文件全部上传完成后调用
				if(ifAllSuccess){
					$.lookPop({
						type: -1,
						title: 'Finish Upload!',
						closeSubset: true,
						html:
							'<div style="width:620px;">' +
							'	<div class="pop_content_word" id="uploadifyPopTipCell">' +
							'		<span class="pop_content_span" id="uploadifyPopTipCell">Success:[<b class="color_green">' + data.filesUploaded + '</b>],  Fail:[<b class="color_red">' + data.errors + '</b>],  Total:[<b>' + data.allBytesLoaded + '</b>]bytes</span>' +
							'	</div>' +
							'</div>',
						callback: allCompleteFn ? allCompleteFn(data) : null
					});
				}
			},
			'onSelectOnce' : function(event,data) {
				if(data.filesSelected == 0){look.showInfo.error('Select once!');}
		    }
		});
	},
	
	/*** 公共预加载 END ***/
	
	/*** home预加载 START ***/
	
	homeLoader : function(){
		if ($("#homeWrapper").length <= 0) {
			loadPage("#wrapper", "home/home.html");
		}
		if(typeof($.cjTextFx) != "function"){
			$.getScript(look._CJTEXTFX_URL, function(){doTextFx();});
		}else{doTextFx();}
		var doTextFx = function(){
			var textFxSettings = {animation: parseInt(Math.random() * 16), easing: look._EASING[parseInt(Math.random() * (look._EASING.length - 1))], animationType: "in", speed: 1E3};
			$("#homeAnnounceCell").text(look._I18N_DATA.$4 + look._I18N_DATA.$5);
			jQuery.cjTextFx(textFxSettings); // INIT FUNCTION
			jQuery.cjTextFx.animate("#homeAnnounceCell");
		}
	},
	
	/*** home预加载 END ***/
	
	/*** plant_account预加载 START ***/
	
	//*************************************
	//* 平台帐号管理系统 -> 平台帐号管理
	//*************************************
	plantAccountManageLoader : function(){
		if($("#plantAccountManageWrapper").length <= 0){
			loadPage("#wrapper", "plant_account/plant_account_manage.html");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		
		$("#searchTypeSelect option[value='" + look.getHashParam("search_type") + "']").attr("selected", "selected");
		$("#searchWordInput").val(look.getHashParam("search_word"));
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var $appIdSelect = $("#appIdSelect").val(),
				$searchTypeInput = $("#searchTypeSelect").val(),
				$searchWordInput = $.trim($("#searchWordInput").val());
			if($appIdSelect == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			if($searchTypeInput == ""){look.showInfo.error(look._I18N_DATA.$433/**请选择查询类型…**/);return false;}
			if($searchWordInput == ""){look.showInfo.error(look._I18N_DATA.$434/**请填写查询词…**/);$("#searchWordInput").focus();return false;}
			location.hash = look.setParam([["appid", $appIdSelect], ["search_type", $searchTypeInput], ["search_word", $searchWordInput], ["page", 1]], location.hash);
		});
		if(look.getHashParam("appid") == ""){
			return false;
		}
		searchPlantUserRequest(look.getHashParam("appid"), look.getHashParam("search_type"), look.getHashParam("search_word"), look.getHashParam("page"));
	},
	
	/*** plant_account预加载 END ***/
	
	/*** recharge预加载 START ***/
	
	//*************************************
	//* 充值消费管理系统 -> 帐号余额管理
	//*************************************
	balanceManageLoader : function(){
		if($("#balanceManageWrapper").length <= 0){
			loadPage("#wrapper", "recharge/balance_manage.html");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
			if(publicInit.authenCheck(look._AUTHEN.payment, 29)){$("#batchAddBucksCell").show();}
		}
		$("#searchTypeSelect option[value='" + look.getHashParam("search_type") + "']").attr("selected", "selected");
		$("#searchWordInput").val(look.getHashParam("search_word"));
		$("#siftSubset").unbind("click").bind("click", function(){
			var $appIdSelect = $("#appIdSelect").val(),
				$serverIdSelect = $("#serverIdSelect").val(),
				$searchTypeInput = $("#searchTypeSelect").val(),
				$searchWordInput = $("#searchWordInput").val();
			if($appIdSelect == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			if($serverIdSelect == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			if($searchTypeInput == ""){look.showInfo.error(look._I18N_DATA.$433/**请选择查询类型…**/);return false;}
			if($searchWordInput == ""){look.showInfo.error(look._I18N_DATA.$434/**请填写查询词…**/);$("#searchWordInput").focus();return false;}
			location.hash = look.setParam([["appid", $appIdSelect], ["server_id", $serverIdSelect], ["search_type", $searchTypeInput], ["search_word", $searchWordInput], ["page", 1]], location.hash);
		});
		//[事件]批量补金币
		$("#batchAddBucksSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 598,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "batch_add_bucks_poper look_box_corner",
						contentHtml: text
					});
					callback();
				});
			}
			var batchAddBucksCallback = function(){
				aceEditGetter({id: "batchAddBucksEditor", mode: "text"});
				publicInit.inputTipStyle("#batchAddBucksPanel input.text", "#batchAddBucksPanel label tt");
				//[事件]确认批量补金币
				$("#publishBatchAddBucksSubset").unbind("click").bind("click", function(){
					if($(this).hasClass("a_as_disabled")){return false;}
					var appId = $("#appIdSelect").val(),
						serverId = $("#serverIdSelect").val(),
						datas = look.aceEditor.getValue(),
						message = $("#messageInput").val();
					if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
					if(serverId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
					if(look.aceEditor.getValue() == ""){look.showInfo.error(look._I18N_DATA.$559/**内容不能为空…**/);look.aceEditor.focus();return false;}
					if(message == ""){look.showInfo.error(look._I18N_DATA.$560/**请填写注释…**/);return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$856/**确认进行批量补金币？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							batchAddBucksRequest(appId, serverId, datas, message);
						}
					});
				});
			}
			getPoperRequest($(this), "recharge/batch_add_bucks_poper.html", batchAddBucksCallback);
		});
		if(look.getHashParam("appid") == "" && look.getHashParam("server_id") == ""){return false;}
		getUserBalanceRequest(look.getHashParam("appid"), look.getHashParam("server_id"),  look.getHashParam("search_type"), look.getHashParam("search_word"), look.getHashParam("page"));
	},
	//*************************************
	//* 充值消费管理系统 -> 充值消费记录 -> 获取列表
	//*************************************
	rechargeConsumeRecordLoader : function(){
		if($("#rechargeConsumeRecordWrapper").length <= 0){
			loadPage("#wrapper", "recharge/recharge_consume_record.html");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		$("#operateTypeSelect option[value='" + look.getHashParam("ot") + "']").attr("selected", "selected");
		$("#searchTypeSelect option[value='" + look.getHashParam("search_type") + "']").attr("selected", "selected");
		$("#searchWordInput").val(look.getHashParam("search_word"));
		$("#siftSubset").unbind("click").bind("click", function(){
			var $appIdSelect = $("#appIdSelect").val(),
				$serverIdSelect = $("#serverIdSelect").val(),
				$operateTypeSelect = $("#operateTypeSelect").val(),
				$searchTypeInput = $("#searchTypeSelect").val(),
				$searchWordInput = $("#searchWordInput").val();
			if($appIdSelect == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			if($operateTypeSelect == ""){look.showInfo.error(look._I18N_DATA.$436/**请选择操作类型…**/);return false;}
			if($searchTypeInput == ""){look.showInfo.error(look._I18N_DATA.$433/**请选择查询类型…**/);return false;}
			if($searchWordInput == ""){look.showInfo.error(look._I18N_DATA.$434/**请填写查询词…**/);$("#searchWordInput").focus();return false;}
			location.hash = look.setParam([["appid", $appIdSelect], ["server_id", $serverIdSelect], ["ot", $operateTypeSelect], ["search_type", $searchTypeInput], ["search_word", $searchWordInput]], location.hash);
		});
		if(look.getHashParam("appid") == ""){return false;}
		getRechargeConsumeRecordRequest(look.getHashParam("ot"), look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("search_type"), look.getHashParam("search_word"));
	},
	//*************************************
	//* 充值消费管理系统 -> 充值消费记录 -> 获取列表 -> 金币/购买/消费历史弹出层
	//*************************************
	balanceRecordPoperLoader : function(uid, poper, serverId){
		var appName = $("#appIdSelect option:selected").text(),
			serverName = $("#serverIdSelect option:selected").text();
		var description = '<span class="pop_content_description">[ ' + look._I18N_DATA.$85/**当前游戏：**/ + appName + ' ] [ ' + look._I18N_DATA.$86/**当前分服：**/ + serverName + ' ]</span>';
		if (poper == "balance") {
			if($("#balanceRecordPoper").length == 0){
				$.lookPop({title: look._I18N_DATA.$915/**查看金币历史记录**/ + description, url: "recharge/balance_record_poper.html"});
				$("#balanceRecordPoper").attr("uid", uid);
			}
		}else if (poper == "buy") {
			if($("#buyRecordPoper").length == 0){
				$.lookPop({title: look._I18N_DATA.$914/**查看购买历史记录**/ + description, url: "recharge/buy_record_poper.html"});
				$("#buyRecordPoper").attr("uid", uid);
			}
		}else if (poper == "consume") {
			if($("#consumeRecordPoper").length == 0){
				$.lookPop({title: look._I18N_DATA.$913/**查看消费历史记录**/ + description, url: "recharge/consume_record_poper.html"});
				$("#consumeRecordPoper").attr("uid", uid);
			}
		}
		
		var dateFrom = look.getLastMonthDate(look.getLocalDate()),
			dateTo = look.dateFormat(look.addDaysByDate(look.getLocalDate(), 1), "yyyy-MM-dd")
		$("#dataStart").val(dateFrom);
		$("#dataEnd").val(dateTo);
		datepickerGetter();
		
		//清空时间事件
		$("#popClearDateSubset").unbind("click").bind("click", function(){
			$("#dataStart,#dataEnd").val("");
		});
		$("#popSiftSubset").unbind("click").bind("click", function(){
			getRecordFn($("#dataStart").val(), $("#dataEnd").val(), 1);
		});
		
		var getRecordFn = function(from, to, page){
			if(poper == "balance"){
				getBalanceRecordRequest(look.getHashParam("appid"), serverId, uid, from, to, page);
			}else if(poper == "buy"){
				getBuyRecordRequest(look.getHashParam("appid"), uid, from, to, page);
			}else if(poper == "consume"){
				getConsumeRecordRequest(look.getHashParam("appid"), serverId, uid, from, to, page);
			}
		}
		getRecordFn(dateFrom, dateTo, 1);
	},
	//*************************************
	//* 充值消费管理系统 -> 黑卡预警记录 -> 获取列表
	//*************************************
	devicePaymentRecordLoader : function(){
		if($("#devicePaymentRecordWrapper").length <= 0){
			loadPage("#wrapper", "recharge/device_payment_record.html");
			datepickerGetter();
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		$("#macInput").val(look.getHashParam("mac"));
		$("#stateSelect option[value='" + look.getHashParam("state") + "']").attr("selected", "selected");
		$("#dataStart").val(look.getHashParam("from"));
		$("#dataEnd").val(look.getHashParam("to"));
		//清空时间事件
		$("#clearDateSubset").unbind("click").bind( "click", function(){
			$("#dataStart,#dataEnd" ).val("");
		});
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				mac = $("#macInput").val(),
				state = $("#stateSelect").val(),
				from = $("#dataStart").val(),
				to = $("#dataEnd").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["mac", mac], ["state", state], ["from", from], ["to", to], ["page", 1]], location.hash);
		});
		if(look.getHashParam("appid") == ""){return false;}
		$("#resultLoader").show();
		devicePaymentRecordRequest(look.getHashParam("appid"), look.getHashParam("mac"), look.getHashParam("state"), look.getHashParam("from"), look.getHashParam("to"), look.getHashParam("page"));
	},
	//*************************************
	//* 充值消费管理系统 -> 未完成支付记录 -> 获取列表
	//*************************************
	unfinishPaymentRecordLoader : function(){
		if($("#unfinishPaymentRecordWrapper").length <= 0){
			loadPage("#wrapper", "recharge/unfinish_payment_record.html");
			datepickerGetter();
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
			if(!(look._PAY_STROE_TYPE_DIC_ARRAY && look._PAY_STROE_TYPE_DIC_ARRAY != 0)){
				getPayStoreTypeDictionaryRequest();
			}
		}
		$("#macInput").val(look.getHashParam("mac"));
		$("#stateSelect option[value='" + look.getHashParam("state") + "']").attr("selected", "selected");
		$("#dataStart").val(look.getHashParam("from"));
		$("#dataEnd").val(look.getHashParam("to"));
		
		//清空时间事件
		$("#clearDateSubset").unbind("click").bind( "click", function(){
			$("#dataStart,#dataEnd" ).val("");
		});
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val(),
				mac = $("#macInput").val(),
				state = $("#stateSelect").val(),
				from = $("#dataStart").val(),
				to = $("#dataEnd").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["mac", mac], ["state", state], ["from", from], ["to", to], ["page", 1]], location.hash);
		});
		if(look.getHashParam("appid") == ""){return false;}
		$("#resultLoader").show();
		unfinishPaymentRecordRequest(look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("mac"), look.getHashParam("state"), look.getHashParam("from"), look.getHashParam("to"), look.getHashParam("page"));
	},
	//*************************************
	//* 充值消费管理系统 -> 成功支付记录 -> 获取列表
	//*************************************
	successPaymentRecordLoader : function(){
		if (!publicInit.authenCheck(look._AUTHEN.payment, 24)) {return false;}
		if($("#successPaymentRecordWrapper").length <= 0){
			loadPage("#wrapper", "recharge/success_payment_record.html");
			datepickerGetter();
			if(look._STAT_INCOME_DIC_ARRAY == undefined){Look.prototype._STAT_INCOME_DIC_ARRAY = new Array();}
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
			if(look._STAT_INCOME_DIC_ARRAY.length == 0){getIncomeDicRequest();}else{getIncomeDicCallback.AssayChannel();}
		}
		var from = look.getHashParam("from") == "" ? look.getLocalDate() + " 00:00:00" : look.getHashParam("from"),
			to = look.getHashParam("to") == "" ? look.dateFormat(look.addDaysByDate(from.split(" ")[0], 1), "yyyy-MM-dd") + " 00:00:00" : look.getHashParam("to");
		from = from.split(" ");
		to = to.split(" ");
		$("#dataStart").val(from[0]);
		$("#dataEnd").val(to[0]);
		$("#startTimeInput").val(from[1]);
		$("#endTimeInput").val(to[1]);
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val(),
				channel = $("#channelSelect").val(),
				dateStart = $("#dataStart").val(),
				dateEnd = $("#dataEnd").val(),
				startTime = $.trim($("#startTimeInput").val()),
				endTime = $.trim($("#endTimeInput").val()),
				reg = /^[0,1,2][0-9](:)[0,1,2,3,4,5][0-9](:)[0-9]{2}/;
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			if(dateStart == "" || dateEnd == "" || startTime == "" || endTime == ""){look.showInfo.error(look._I18N_DATA.$561/**日期时间都不能为空…**/);return false;}
			if(!reg.test(startTime)){look.showInfo.error(look._I18N_DATA.$477/**"开始时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…"**/);$("#startTimeInput").focus();return false;}
			if(!reg.test(endTime)){look.showInfo.error(look._I18N_DATA.$478/**"结束时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…"**/);$("#endTimeInput").focus();return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["channel", channel], ["from", dateStart + " " + startTime], ["to", dateEnd + " " + endTime], ["page", 1]], location.hash);
		});
		if(look.getHashParam("appid") == ""){return false;}
		if (!publicInit.authenCheck(look._AUTHEN.payment, 25)) {return false;}
		$("#resultLoader").show();
		successPaymentRecordRequest(look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("channel"), look.getHashParam("from"), look.getHashParam("to"), look.getHashParam("page"));
	},
	//*************************************
	//* 充值消费管理系统 -> 客服加币记录 -> 获取列表
	//*************************************
	addBucksRecordLoader : function(){
		if($("#addBucksRecordWrapper").length <= 0){
			loadPage("#wrapper", "recharge/add_bucks_record.html");
			datepickerGetter();
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		$("#dataStart").val(look.getHashParam("from"));
		$("#dataEnd").val(look.getHashParam("to"));
		
		//清空时间事件
		$("#clearDateSubset").unbind("click").bind( "click", function(){
			$("#dataStart,#dataEnd" ).val("");
		});
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val(),
				from = $("#dataStart").val(),
				to = $("#dataEnd").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["from", from], ["to", to], ["page", 1]], location.hash);
		});
		if(look.getHashParam("appid") == ""){return false;}
		$("#resultLoader").show();
		getAddBucksHistoryRequest(look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("from"), look.getHashParam("to"), look.getHashParam("page"));
	},
	//*************************************
	//* 充值消费管理系统 -> 批量加币记录 -> 获取列表
	//*************************************
	batchAddBucksRecordLoader : function(){
		if($("#batchAddBucksRecordWrapper").length <= 0){
			loadPage("#wrapper", "recharge/batch_add_bucks_record.html");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["page", 1]], location.hash);
		});
		if(look.getHashParam("appid") == ""){return false;}
		$("#resultLoader").show();
		getBatchAddBucksHistoryRequest(look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("page"));
	},
	
	/*** recharge预加载 END ***/
	
	/*** service预加载 START ***/
	
	//*************************************
	//* 客服系统 -> 找回帐号反馈
	//*************************************
	retrieveAccountFeedbackLoader : function(){
		if($("#retrieveAccountWrapper").length <= 0){
			loadPage("#wrapper", "service/retrieve_account_feedback.html");
			if(!look.getHashParam("dream")){$("#appSiftCell").show();}
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
			look._AGENT_DIC_ARRAY.length == 0 ? getAgentDictionaryRequest() : getAgentDictionaryCallback.Assay();
		}
		$("#ifReplySelect option[value='" + look.getHashParam("state") + "']").attr("selected", "selected");
		$("#dataStart").val(look.getHashParam("from"));
		$("#dataEnd").val(look.getHashParam("to"));
		datepickerGetter();
			
		//清空时间事件
		$("#clearDateSubset").unbind("click").bind( "click", function(){
			$("#dataStart,#dataEnd" ).val("");
		});
		$("#siftSubset").unbind("click").bind("click", function(){
			var $ifReplay = $("#ifReplySelect").val(),
				$appId = $("#appIdSelect").val(),
				$agent = $("#agentSelect").val(),
				$from = $("#dataStart").val(),
				$to = $("#dataEnd").val();
			if($appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["state", $ifReplay], ["appid", $appId], ["agent", $agent], ["from", $from], ["to", $to], ["page", 1]], location.hash);
		});
		if(look.getHashParam("appid") == ""){return false;}
		$("#resultLoader").show();
		getRetrieveAccountListRequest(look.getHashParam("state"), look.getHashParam("appid"), look.getHashParam("agent"), look.getHashParam("from"), look.getHashParam("to"), look.getHashParam("page"));
	},
	//*************************************
	//* 客服系统 -> 客服反馈
	//*************************************
	serviceFeedbackLoader : function(){
		if($("#serviceFeedbackWrapper").length <= 0){
			loadPage("#wrapper", "service/service_feedback.html");
			look._FEEDBACK_TYPE_DIC_ARRAY.length == 0 ? getFeedBackTypeDictionaryRequest() : getFeedBackTypeDictionaryCallback.Assay();
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
			publicInit.authenCheck(look._AUTHEN.cs, 9) ? $("#batchFeedbackSubset").show() : '';
			publicInit.authenCheck(look._AUTHEN.cs, 10) ? $("#batchIgnoreSubset").show() : '';
			Look.prototype._SEVICE_COLLECT_ARRAY = new Array();
		}
		!look.getHashParam("dream") ? $("#appSiftCell").show() : $("#appSiftCell").hide();
		$("#ifReplySelect option[value='" + look.getHashParam("state") + "']").attr("selected", "selected");
		$("#collectSelect option[value='" + look.getHashParam("collect") + "']").attr("selected", "selected");
		$("#paySelect option[value='" + look.getHashParam("pay") + "']").attr("selected", "selected");
		$("#dataStart").val(look.getHashParam("from"));
		$("#dataEnd").val(look.getHashParam("to"));
		$("#searchTypeSelect option[value='" + look.getHashParam("search_type") + "']").attr("selected", "selected");
		$("#searchWordInput").val(look.getHashParam("search_word"));
		datepickerGetter();
		
		//清空时间事件
		$("#clearDateSubset").unbind("click").bind("click", function(){
			$("#dataStart,#dataEnd").val("");
		});
		$("#siftSubset").unbind("click").bind("click", function(){
			var $feedbackType = $( "#feedbackTypeSelect").val(),
				$appId = $("#appIdSelect").val(),
				$serverId = $("#serverIdSelect").val(),
				$ifReplay = $("#ifReplySelect").val(),
				$collect = $("#collectSelect").val(),
				$pay = $("#paySelect").val(),
				$from = $("#dataStart").val(),
				$to = $("#dataEnd").val(),
				$searchType = $("#searchTypeSelect").val(),
				$searchWord = $("#searchWordInput").val();
			if($appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["f_type", $feedbackType], ["appid", $appId], ["server_id", $serverId], ["state", $ifReplay], ["collect", $collect], ["pay", $pay], ["from", $from], ["to", $to], ["search_type", $searchType], ["search_word", $searchWord], ["page", 1]], location.hash);
		});
		if($.cookie('batch_message')){
			look._BATCH_FEEDBACK_REPLAY_ARRAY = JSON.parse($.cookie('batch_message'));
		}
		$("#batchFeedbackSubset").unbind("click").bind("click", function(){
			$("#batchFeedbackEditorPanel").toggle();
			if ($("#batchFeedbackEditorPanel").is(":visible")) {
				$("#batchFeedbackTextarea").focus();
			}
		});
		//[事件]取消批量回复
		$("#cancelBatchFeedbackSubset").unbind("click").bind("click", function(){
			$("#batchFeedbackEditorPanel").hide();
			$("#batchFeedbackTextarea").val("");
		});
		//[事件]确认批量回复
		$("#confirmBatchFeedbackSubset").unbind("click").bind("click", function(){
			if($(this).hasClass("a_as_disabled")){return false;}
			var $content = $.trim($("#batchFeedbackTextarea").val());
			if($content == ""){look.showInfo.error(look._I18N_DATA.$400/**回复内容不能为空…**/);$("#batchFeedbackTextarea").focus();return false;}
			if(look._BATCH_FEEDBACK_REPLAY_ARRAY.length == 0){look.showInfo.error(look._I18N_DATA.$401/**没有选择任何需要批量回复的反馈条目…**/);return false;}
			if(look._BATCH_FEEDBACK_REPLAY_ARRAY.length > 100){look.showInfo.error(look._I18N_DATA.$402/**批量回复的反馈条目不能超过100条…**/);return false;}
			$(this).addClass("a_as_disabled");
			look.showInfo.right(look._I18N_DATA.$403/**正在发送批量回复…**/);
			sendServiceFeedbackMessageRequest(look._BATCH_FEEDBACK_REPLAY_ARRAY, $content.replace(/[(^*\n*)|(^*\r*)]/g, "%0a"));
		});
		//[事件]批量忽略
		$("#batchIgnoreSubset").unbind("click").bind("click", function(){
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$804/**确定忽略选择的反馈条目？**/ + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					ignoreServiceFeedbackMessageRequest(look._BATCH_FEEDBACK_REPLAY_ARRAY);
					obj.addClass("a_as_disabled");
				}
			});
		});
		if(look.getHashParam("appid") == ""){return false;}
		//获取当然客服反馈统计信息
		if (!(look.getHashParam("dream") == "lager")) {
			$("#feedbackStatCell").fadeIn();
			getServiceFeedbackStatRequest(look.getHashParam("appid"), look.getHashParam("server_id"));
		}else{
			$("#feedbackStatCell").hide();
		}
		$("#resultLoader").show();
		getFeedbackListRequest(look.getHashParam("dream"), look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("f_type"), look.getHashParam("state"), look.getHashParam("collect"), look.getHashParam("pay"), look.getHashParam("from"), look.getHashParam("to"), look.getHashParam("search_type"), look.getHashParam("search_word"), look.getHashParam("page"));
	},
	//*************************************
	//* 客服系统 -> 预设回复
	//*************************************
	presetReplyLoader : function(){
		if($("#presetReplyWrapper").length <= 0){
			loadPage("#wrapper", "service/preset_reply.html");
			$("#presetReplyTitle").focus();
			publicInit.inputTipStyle("label input.text, label textarea", ".publisher_cell label tt");
			if(publicInit.authenCheck(look._AUTHEN.cs, 14)){$("#modifyPresetReplyCell").show().next().removeClass("no_margin");}
		}
		//[事件]打开修改
		$("#openModifySubset").unbind("click").bind("click", function(){
			$(this).parent().slideUp().next().slideDown(function(){
				$("#sendPresetReplySubset").hide();$("#modifyPresetReplySubset").show();
			});
			if(look._ALL_PRESET_REPLY_ARRAY && look._ALL_PRESET_REPLY_ARRAY.length != 0){
				getAllPresetReplyCallback.Assay();
			}else{
				Look.prototype._ALL_PRESET_REPLY_ARRAY = new Array();
				getAllPresetReplyRequest();
			}
		});
		//[事件]关闭修改
		$("#cancelModifySubset").unbind("click").bind("click", function(){
			$(this).parent().slideUp().prev().slideDown(function(){
				$("#sendPresetReplySubset").show();$("#modifyPresetReplySubset").hide();
				$("#presetReplyTitle, #presetReplyContent").val("");
				publicInit.inputTipStyle("label input.text, label textarea", ".publisher_cell label tt");
				$("#presetReplyTitle").focus();
			});
		});
		function presetReplyEvent(presetReplyTitle, presetReplyContent, presetReplySelect){
			if(presetReplySelect && presetReplySelect == ""){look.showInfo.error(look._I18N_DATA.$417/**请选择一个预设回复**/);return false;}
			if(presetReplyTitle == ""){look.showInfo.error(look._I18N_DATA.$418/**请填写预设回复标题…**/);$("#presetReplyTitle").focus();return false;}
			if(look.getByteLen(presetReplyTitle) > 70){look.showInfo.error(look._I18N_DATA.$419/**预设回复标题应该少于70个字符…**/);$("#presetReplyTitle").focus();return false;}
			if(presetReplyContent == ""){look.showInfo.error(look._I18N_DATA.$420/**请填写预设回复内容…**/);$("#presetReplyContent").focus();return false;}
			if(look.getByteLen(presetReplyContent) > 500){look.showInfo.error(look._I18N_DATA.$421/**预设回复内容应该少于500个字符…**/);$("#presetReplyContent").focus();return false;}
			return true;
		}
		//[事件]提交创建预设回复
		$("#sendPresetReplySubset").unbind("click").bind("click", function(){
			if($(this).hasClass("a_as_disabled")){return false;}
			var presetReplyTitle = $.trim($("#presetReplyTitle").val()),
				presetReplyContent = $.trim($("#presetReplyContent").val());
			if(presetReplyEvent(presetReplyTitle, presetReplyContent)){
				$(this).addClass("a_as_disabled").text(look._I18N_DATA.$609/**提交中…**/);
				createPresetReplyRequest(presetReplyTitle, presetReplyContent);
			}
		});
		//[事件]修改更新预设回复
		$("#modifyPresetReplySubset").unbind("click").bind("click", function(){
			if($(this).hasClass("a_as_disabled")){return false;}
			var presetReplyTitle = $.trim($("#presetReplyTitle").val()),
				presetReplyContent = $.trim($("#presetReplyContent").val()),
				presetReplySelect = $("#presetReplySelect").val();
			if(presetReplyEvent(presetReplyTitle, presetReplyContent, presetReplySelect)){
				$(this).addClass("a_as_disabled").text(look._I18N_DATA.$609/**提交中…**/);
				modifyPresetReplyRequest($("#presetReplySelect").val(), presetReplyTitle, presetReplyContent);
			}
		});
	},
	//*************************************
	//* 客服系统 -> 自动回复
	//*************************************
	autoReplyLoader : function(){
		if($("#autoReplyWrapper").length <= 0){
			loadPage("#wrapper", "service/auto_reply.html");
			$("#cnContent").focus();
			publicInit.inputTipStyle("label textarea", ".publisher_cell label tt");
			getAutoReplyRequest();
			//[事件]开启自动回复
			$("#openAutoReplySubset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var messages = new Array(), messageNum = 0;
				$(".publisher_label textarea").each(function(){
					var lang = $(this).attr("lang"),
						value = $.trim($(this).val());
					if(value != ""){
						messageNum++;
					}
					messages.push('{"locale":"' + lang + '","message":"' + encodeURI(value.replace(/[(^*\n*)|(^*\r*)]/g, "%0a")) + '"}');
				});
				if(messageNum == 0){look.showInfo.error(look._I18N_DATA.$562/**全部都是空就提交，有意思吗？有意思吗？**/);$("#cnContent").focus();return false;}
				$(this).addClass("a_as_disabled").text(look._I18N_DATA.$653/**开启中…**/);
				openAutoReplyRequest("[" + messages + "]");
			});
			//[事件]关闭自动回复
			$("#closeAutoReplySubset").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				$(this).addClass("a_as_disabled").text(look._I18N_DATA.$654/**关闭中…**/);
				closeAutoReplyRequest();
			});
		}
	},
	
	/*** service预加载 END ***/
	
	/*** data预加载 START ***/
	
	//*************************************
	//* 数据分析中心 -> 数据中心所有字典
	//*************************************
	allStatDicLoader : function(){
		if(look._STAT_DIC_ARRAY == undefined){
			Look.prototype._STAT_DIC_ARRAY = new Array();
		}
		look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		if(look._STAT_DIC_ARRAY.length == 0){
			getAllStatDicRequest();
		}else{
			getAllStatDicCallback.AssayChannel();
			getAllStatDicCallback.AssayLanguage();
			getAllStatDicCallback.AssayDevice();
		}
	},
	//*************************************
	//* 数据分析中心 -> 报表字典
	//*************************************
	statementDicLoader : function(){
		if(look._STATEMENT_DIC_ARRAY == undefined){Look.prototype._STATEMENT_DIC_ARRAY = null;}
		!look._STATEMENT_DIC_ARRAY ? getStatementDicRequest() : getStatementDicCallback.Assay();
	},
	//*************************************
	//* 数据分析中心 -> 重新加载图表
	//*************************************
	reloadAnalysisLoader : function(date){
		getStatementCommentRequest(look.getHashParam("appid"), date);
		var appid = look.getHashParam("appid"),
			serverId = look.getHashParam("server_id"),
			language = look.getHashParam("language"),
			device = look.getHashParam("device"),
			from = look.getHashParam("from").replace(/-/g, ""),
			to = look.getHashParam("to").replace(/-/g, "");
		switch(look.getHashParam("type")){
			case "vivace_user_analysis" : getVivaceUserAnalysisRequest(appid, serverId, language, device, from, to);
			break;
			case "new_user_analysis" : getNewUserAnalysisRequest(appid, serverId, language, device, from, to);
			break;
		}
	},
	//*************************************
	//* 数据分析中心 -> 注释
	//*************************************
	statementCommentLoader : function(){
		if (publicInit.authenCheck(look._AUTHEN.da, 4)) {
			$(".comment_panel").show();
			//[事件]注释的显示隐藏
			$("#commentShowSubset").unbind("click").bind("click", function(){
				if ($("#commentTabel").is(":hidden")) {
					$(this).children("a").text(look._I18N_DATA.$655/**- 收起**/);
					$("#commentTabel").slideDown();
				}else {
					$(this).children("a").html(look._I18N_DATA.$656/**+ 展开**/);
					$("#commentTabel").slideUp();
				}
			}).bind("mouseenter mouseleave", function(){
				$(this).toggleClass("hover");
			});
		}
		if (publicInit.authenCheck(look._AUTHEN.da, 6)) {
			//[事件]发送注释
			$("#addCommentSubset").removeClass("a_as_disabled").unbind("click").bind("click", function(){
				if($(this).hasClass("a_as_disabled")){return false;}
				var commentDate = $("#commentDate").val(), commentContent = $.trim($("#commentContent").val());
				if (commentContent == "") {look.showInfo.error(look._I18N_DATA.$563/**注释内容不能为空…**/);$("#commentContent").focus();return false;}
				$(this).addClass("a_as_disabled");
				addStatementCommentRequest(look.getHashParam("appid"), look.getHashParam("server_id"), commentDate.replace(/-/g, ""), commentContent);
			});
		}
	},
	//*************************************
	//* 数据分析中心 -> 按钮事件
	//*************************************
	statEventCommonFn : {
		subset1: function(request, callback){
			datepickerGetter();contrastDatepickerGetter("#contrastDateStart");
			var to = look.getHashParam("to") == "" ? look.getLocalDate() : look.getHashParam("to"),
				from = look.getHashParam("from") == "" ? look.getLastMonthDate(to) : look.getHashParam("from"),
				appId = look.getHashParam("appid"),
				serverId = look.getHashParam("server_id"),
				language = look.getHashParam("language"),
				channel = look.getHashParam("channel"),
				device = look.getHashParam("device");
			$("#dataStart").val(from);
			$("#dataEnd").val(to);
			$("#contrastCheckbox").attr("checked", false);
			
			$("#siftSubset").unbind("click").bind("click", function(){
				var appId = $("#appIdSelect").val(),
					serverId = $("#serverIdSelect").val(),
					language = $("#languageSelect").val(),
					device = $("#deviceSelect").val(),
					channel = $("#channelSelect").val(),
					from = $("#dataStart").val(),
					to = $("#dataEnd").val(),
					contrastAppId = $("#contrastAppIdSelect").val(),
					contrastServerId = $("#contrastServerIdSelect").val(),
					contrastLanguage = $("#contrastLanguageSelect").val(),
					contrastDevice = $("#contrastDeviceSelect").val(),
					contrastChannel = $("#contrastChannelSelect").val(),
					contrastFrom = $("#contrastDateStart").val(),
					contrastTo = "";
				if(appId == "" || from == "" || to == ""){look.showInfo.error(look._I18N_DATA.$564/**应用及时间为必须项…**/);return false;}
				contrastTo = look.dateFormat(look.addDaysByDate(contrastFrom, look.getDiffDays(from, to)), "yyyy-MM-dd");
				if(look.getDiffDays(from, to) > 60){look.showInfo.error(look._I18N_DATA.$565/**只能查询间隔60天内的数据…**/);return false;}
				if($("#contrastCheckbox").is(":checked")){
					if(contrastFrom == "" || contrastAppId == ""){look.showInfo.error(look._I18N_DATA.$566/**对比日期及应用为必须项…**/);return false;}
					request(contrastAppId, contrastServerId, contrastLanguage, contrastDevice, contrastChannel, contrastFrom.replace(/-/g,""), contrastTo.replace(/-/g,""));
					return;
				}
				location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["language", language], ["device", device], ["channel", channel], ["from", from], ["to", to], ["page", 1]], location.hash);
			});
			//清空时间事件
			$("#clearContrastDateSubset").unbind("click").bind("click", function(){
				$("#contrastDateStart").val("");
			});
			//图表切换按钮
			$("#dataChartSift a").unbind("click").bind("click",function(){
				$(this).addClass("on").siblings().removeClass("on");
				callback.Convert();
			});
			if(appId == ""){$(".result_panel").hide();return false;}
			$(".result_panel").fadeIn();
			request(appId, serverId, language, device, channel, from.replace(/-/g,""), to.replace(/-/g,""));
		},
		subset2: function(request, callback){
			datepickerGetter();contrastDatepickerGetter("#contrastDateStart");
			var to = look.getHashParam("to") == "" ? look.getLocalDate() : look.getHashParam("to"),
				from = look.getHashParam("from") == "" ? look.getLastMonthDate(to) : look.getHashParam("from"),
				appId = look.getHashParam("appid"), serverId = look.getHashParam("server_id"), channel = look.getHashParam("channel");
			$("#dataStart").val(from);
			$("#dataEnd").val(to);
			$("#contrastCheckbox").attr("checked", false);
		
			$("#siftSubset").unbind("click").bind("click", function(){
				var appId = $("#appIdSelect").val(),
					serverId = $("#serverIdSelect").val(),
					channel = $("#channelSelect").val(),
					from = $("#dataStart").val(),
					to = $("#dataEnd").val(),
					contrastAppId = $("#contrastAppIdSelect").val(),
					contrastServerId = $("#contrastServerIdSelect").val(),
					contrastChannel = $("#contrastChannelSelect").val(),
					contrastFrom = $("#contrastDateStart").val(),
					contrastTo = look.dateFormat(look.addDaysByDate(contrastFrom, look.getDiffDays(from, to)), "yyyy-MM-dd");
				if(look.getDiffDays(from, to) > 60){look.showInfo.error(look._I18N_DATA.$565/**只能查询间隔60天内的数据…**/);return false;}
				if($("#contrastCheckbox").is(":checked")){
					if(contrastFrom == "" || contrastAppId == ""){look.showInfo.error(look._I18N_DATA.$566/**对比日期及应用为必须项…**/);return false;}
					request(contrastAppId, contrastServerId, contrastChannel, contrastFrom.replace(/-/g,""), contrastTo.replace(/-/g,""));
					return;
				}
				location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["channel", channel], ["from", from], ["to", to], ["page", 1]], location.hash);
			});
			//清空时间事件
			$("#clearContrastDateSubset").unbind("click").bind("click", function(){
				$("#contrastDateStart").val("");
			});
			//图表切换按钮
			$("#dataChartSift a").unbind("click").bind("click",function(){
				$(this).addClass("on").siblings().removeClass("on");
				callback.Convert();
			});
			if(appId == ""){$(".result_panel").hide();return false;}
			$(".result_panel").fadeIn();
			request(appId, serverId, channel, from.replace(/-/g,""), to.replace(/-/g,""));
		}
	},
	//*************************************
	//* 数据分析中心 -> 活跃用户分析
	//*************************************
	vivaceUserAnalysisLoader : function(){
		if($("#vivaceUserAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/vivace_user_analysis.html");
			flotGetter("crosshair");
		}
		initLoader.allStatDicLoader();
		initLoader.statementCommentLoader();
		initLoader.statEventCommonFn.subset1(getVivaceUserAnalysisRequest, getVivaceUserAnalysisCallback);
	},
	//*************************************
	//* 数据分析中心 -> 新增用户分析
	//*************************************
	newUserAnalysisLoader : function(){
		if($("#newUserAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/new_user_analysis.html");
			flotGetter("crosshair");
		}
		initLoader.allStatDicLoader();
		initLoader.statementCommentLoader();
		initLoader.statEventCommonFn.subset1(getNewUserAnalysisRequest, getNewUserAnalysisCallback);
	},
	//*************************************
	//* 数据分析中心 -> 用户留存分析
	//*************************************
	retentionUserAnalysisLoader : function (){
		if($("#retentionUserAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/retention_user_analysis.html");
			flotGetter("crosshair");
		}
		initLoader.allStatDicLoader();
		initLoader.statEventCommonFn.subset1(getRetentionUserAnalysisRequest);
	},
	//*************************************
	//* 数据分析中心 -> 版本情况分析
	//*************************************
	systemVersionAnalysisLoader : function(){
		if($("#systemVersionAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/system_version_analysis.html");
			flotGetter("stack");
		}
		initLoader.allStatDicLoader();
		initLoader.statEventCommonFn.subset2(getSystemVersionAnalysisRequest);
	},
	//*************************************
	//* 数据分析中心 -> 设备情况分析
	//*************************************
	deviceTypeAnalysisLoader : function(){
		if($("#deviceTypeAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/device_type_analysis.html");
			flotGetter("stack");
		}
		initLoader.allStatDicLoader();
		initLoader.statEventCommonFn.subset2(getDeviceTypeAnalysisRequest);
	},
	//*************************************
	//* 数据分析中心 -> 活跃设备分析
	//*************************************
	vivaceDeviceAnalysisLoader : function(){
		if($("#vivaceDeviceAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/vivace_device_analysis.html");
			flotGetter("crosshair");
		}
		initLoader.allStatDicLoader();
		initLoader.statEventCommonFn.subset1(getVivaceDeviceAnalysisRequest, getVivaceDeviceAnalysisCallback);
	},
	//*************************************
	//* 数据分析中心 -> 新增设备分析
	//*************************************
	newDeviceAnalysisLoader : function(){
		if($("#newDeviceAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/new_device_analysis.html");
			flotGetter("crosshair");
		}
		initLoader.allStatDicLoader();
		initLoader.statEventCommonFn.subset1(getNewDeviceAnalysisRequest, getNewDeviceAnalysisCallback);
	},
	//*************************************
	//* 数据分析中心 -> 设备留存分析
	//*************************************
	retentionDeviceAnalysisLoader : function (){
		if($("#retentionDeviceAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/retention_device_analysis.html");
			flotGetter("crosshair");
		}
		initLoader.allStatDicLoader();
		initLoader.statEventCommonFn.subset1(getRetentionDeviceAnalysisRequest);
	},
	//*************************************
	//* 数据分析中心 -> 转化分析
	//*************************************
	conversionAnalysisLoader : function(){
		if($("#conversionAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/conversion_analysis.html");
			flotGetter("crosshair");
		}
		initLoader.allStatDicLoader();
		initLoader.statEventCommonFn.subset2(getConversionAnalysisRequest, getConversionAnalysisCallback);
	},
	//*************************************
	//* 数据分析中心 -> 收入情况分析
	//*************************************
	incomeAnalysisLoader : function(){
		if($("#incomeAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/income_analysis.html");
			flotGetter("crosshair");
			datepickerGetter();contrastDatepickerGetter("#contrastDateStart");
			if(look._STAT_INCOME_DIC_ARRAY == undefined){Look.prototype._STAT_INCOME_DIC_ARRAY = new Array();}
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
			if(look._STAT_INCOME_DIC_ARRAY.length == 0){getIncomeDicRequest();}else{getIncomeDicCallback.AssayChannel();getIncomeDicCallback.AssayDeviceType();getIncomeDicCallback.AssayLocale();}
		}
		//清空时间事件
		$("#clearContrastDateSubset").unbind("click").bind("click", function(){
			$("#contrastDateStart").val("");
		});
		var getPayAnalysisFn = function(){
			var to = look.getHashParam("to") == "" ? look.getLocalDate() : look.getHashParam("to"),
				from = look.getHashParam("from") == "" ? look.getLastMonthDate(to) : look.getHashParam("from"),
				appId = look.getHashParam("appid"),
				serverId = look.getHashParam("server_id"),
				channel = look.getHashParam("channel"),
				deviceType = look.getHashParam("device_type"),
				locale = look.getHashParam("locale");
			$("#channelSelect").val(channel);
			$("#deviceTypeSelect").val(deviceType);
			$("#localeSelect").val(locale);
			$("#dataStart").val(from);
			$("#dataEnd").val(to);
			$("#contrastCheckbox").attr("checked", false);
			if(appId == ""){return false;}
			$(".result_panel").fadeIn();
			getPayAnalysisRequest(appId, serverId, channel, deviceType, locale, from, to);
		};
		
		getPayAnalysisFn();
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val(),
				channel = $("#channelSelect").val(),
				deviceType = $("#deviceTypeSelect").val(),
				locale = $("#localeSelect").val(),
				from = $("#dataStart").val(),
				to = $("#dataEnd").val(),
				contrastAppId = $("#contrastAppIdSelect").val(),
				contrastServerId = $("#contrastServerIdSelect").val(),
				contrastChannel = $("#contrastChannelSelect").val(),
				contrastDeviceType = $("#contrastDeviceTypeSelect").val(),
				contrastLocale = $("#contrastLocaleSelect").val(),
				contrastFrom = $("#contrastDateStart").val(),
				contrastTo = look.dateFormat(look.addDaysByDate(contrastFrom, look.getDiffDays(from, to)), "yyyy-MM-dd");
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$564/**应用为必须项…**/);return false;}
			if(look.getDiffDays(from, to) > 60){look.showInfo.error(look._I18N_DATA.$565/**只能查询间隔60天内的数据…**/);return false;}
			if($("#contrastCheckbox").is(":checked")){
				if(contrastFrom == "" || contrastAppId == ""){look.showInfo.error(look._I18N_DATA.$566/**对比日期及应用为必须项…**/);return false;}
				getPayAnalysisRequest(contrastAppId, contrastServerId, contrastChannel, contrastDeviceType, contrastLocale, contrastFrom, contrastTo);
				return;
			}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["channel", channel], ["device_type", deviceType], ["locale", locale], ["from", from], ["to", to]], location.hash);
		});
		
		//图表切换按钮
		$("#dataChartSift a").unbind("click").bind("click",function(){
			$(this).addClass("on").siblings().removeClass("on");
			getPayAnalysisCallback.Convert();
		});
	},
	//*************************************
	//* 数据分析中心 -> 新用户收入分析
	//*************************************
	newUserIncomeAnalysisLoader : function(){
		if($("#newUserIncomeAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/new_user_income_analysis.html");
			datepickerGetter();datepickerGetter("#userDateStart, #userDateEnd");
			if(look._STAT_INCOME_DIC_ARRAY == undefined){Look.prototype._STAT_INCOME_DIC_ARRAY = new Array();}
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
			if(look._STAT_INCOME_DIC_ARRAY.length == 0){getIncomeDicRequest();}else{getIncomeDicCallback.AssayChannel();getIncomeDicCallback.AssayDeviceType();getIncomeDicCallback.AssayLocale();}
			Look.prototype._DATA_POST_DAY = null;//定义一个临时全局变量，用于存放当前请求的日期
			Look.prototype._DATA_BACK_DATA = new Array();//定义一个临时全局变量，用于存放当前日期返回的数据
		}
		
		var getNewUserPayAnalysisFn = function(){
			var to = look.getHashParam("to") == "" ? look.getLocalDate() : look.getHashParam("to"),
				from = look.getHashParam("from") == "" ? look.getLastMonthDate(to) : look.getHashParam("from"),
				appId = look.getHashParam("appid"),
				serverId = look.getHashParam("server_id"),
				userFrom = look.getHashParam("user_from") == "" ? from : look.getHashParam("user_from"),
				userTo = look.getHashParam("user_to") == "" ? look.dateFormat(look.addDaysByDate(userFrom, 6), "yyyy-MM-dd") : look.getHashParam("user_to");
				customMonth = look.getHashParam("custom_month") == "" ? "" : look.getHashParam("custom_month"),
				channel = look.getHashParam("channel"),
				deviceType = look.getHashParam("device_type"),
				locale = look.getHashParam("locale");
			var postFrom = from, postTo = to;
			$("#dataStart").val(from);
			$("#dataEnd").val(to);
			$("#userDateStart").val(userFrom);
			$("#userDateEnd").val(userTo);
			$("#customMonthInput").val(customMonth);
			if(appId == ""){return false;}
			look._DATA_POST_DAY = userFrom;
			look._DATA_BACK_DATA.length = 0;
			if(customMonth != "" && customMonth != 0){
				postFrom = look.dateFormat(look.addDaysByDate(look._DATA_POST_DAY, 30 * (customMonth - 1)), "yyyy-MM-dd");
				postTo = look.dateFormat(look.addDaysByDate(look._DATA_POST_DAY, 30 * customMonth), "yyyy-MM-dd");
			}
			getNewUserPayAnalysisRequest(appId, serverId, postFrom, postTo, look._DATA_POST_DAY, channel, deviceType, locale);
		};
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val(),
				from = $("#dataStart").val(),
				to = $("#dataEnd").val(),
				customMonth = $.trim($("#customMonthInput").val()),
				userFrom = $("#userDateStart").val(),
				userTo = $("#userDateEnd").val(),
				channel = $("#channelSelect").val(),
				deviceType = $("#deviceTypeSelect").val(),
				locale = $("#localeSelect").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$564/**应用为必须项…**/);return false;}
			if(customMonth != ""){
				if(isNaN(customMonth)){look.showInfo.error(look._I18N_DATA.$567/**请输入数字…**/);$("#customMonthInput").focus();return false;}
			}else{
				if(look.getDiffDays(from, to) > 31){look.showInfo.error(look._I18N_DATA.$568/**只能查询间隔31天内的数据…**/);return false;}
			}
			if(look.getDiffDays(userFrom, userTo) > 31){look.showInfo.error(look._I18N_DATA.$569/**新用户间隔必须在31天内…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["from", from], ["to", to], ["user_from", userFrom], ["user_to", userTo], ["custom_month", customMonth], ["channel", channel], ["device_type", deviceType], ["locale", locale]], location.hash);
		});
		getNewUserPayAnalysisFn();
	},
	//*************************************
	//* 数据分析中心 -> 新用户收入月报
	//*************************************
	newUserIncomeStatementLoader : function(){
		if($("#newUserIncomeStatementWrapper").length <=0) {
			loadPage("#wrapper", "data/new_user_income_statement.html");
			flotGetter("crosshair");
			datepickerNoDayGetter("#triggerDateInput","#dateInput", new Date(look.getLastMonthDate(look.getLocalDate())));
			datepickerNoDayGetter("#contrastTriggerDateInput","#contrastDateInput", new Date(look.getLastMonthDate(look.getLocalDate())));
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		var getNewUserPayStatementFn = function(){
			var date = look.getLocalDate().split("-"),
				year = look.getHashParam("year") == "" ? date[0] : look.getHashParam("year"),
				month = look.getHashParam("month") == "" ? date[1] - 1 : look.getHashParam("month"),
				appId = look.getHashParam("appid"),
				serverId = look.getHashParam("server_id");
			$("#triggerDateInput").val(year + '-' + month).attr({"yy": year, "mm": month});
			$("#contrastCheckbox").attr("checked", false);
			if(appId == ""){return false;}
			$(".result_panel").fadeIn();
			getNewUserPayStatementRequest(look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("year"), look.getHashParam("month"));
		};
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val(),
				year = $("#triggerDateInput").attr("yy"),
				month = $("#triggerDateInput").attr("mm"),
				contrastAppId = $("#contrastAppIdSelect").val(),
				contrastServerId = $("#contrastServerIdSelect").val(),
				contrastYear = $("#contrastTriggerDateInput").attr("yy"),
				contrastMonth = $("#contrastTriggerDateInput").attr("mm");
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$564/**应用为必须项…**/);return false;}
			if($("#contrastCheckbox").is(":checked")){
				if(contrastYear == undefined || contrastMonth == undefined || contrastAppId == ""){look.showInfo.error(look._I18N_DATA.$566/**对比日期及应用为必须项…**/);return false;}
				getNewUserPayStatementRequest(contrastAppId, contrastServerId, contrastYear, contrastMonth);
				return;
			}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["year", year], ["month", month]], location.hash);
		});
		//图表切换按钮
		$("#dataChartSift a").unbind("click").bind("click",function(){
			$(this).addClass("on").siblings().removeClass("on");
			getNewUserPayStatementCallback.Convert();
		});
		getNewUserPayStatementFn();
	},
	//*************************************
	//* 数据分析中心 -> 用户付费统计
	//*************************************
	userPayStatementLoader : function(){
		if($("#userPayAnalysisWrapper").length <=0) {
			loadPage("#wrapper", "data/user_pay_analysis.html");
			flotGetter("crosshair");
			datepickerGetter();
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		
		var from = look.getHashParam("date_from") == "" ? " 00:00:00" : look.getHashParam("date_from"),
			to = look.getHashParam("date_to") == "" ? " 00:00:00" : look.getHashParam("date_to");
		from = from.split(" ");
		to = to.split(" ");
		$("#dataStart").val(from[0]);
		$("#dataEnd").val(to[0]);
		$("#startTimeInput").val(from[1]);
		$("#endTimeInput").val(to[1]);
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val(),
				dateStart = $("#dataStart").val(),
				dateEnd = $("#dataEnd").val(),
				startTime = $.trim($("#startTimeInput").val()),
				endTime = $.trim($("#endTimeInput").val());
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["date_from", dateStart + " " + startTime], ["date_to", dateEnd + " " + endTime]], location.hash);
		});
		//图表切换按钮
		$("#dataChartSift a").unbind("click").bind("click",function(){
			$(this).addClass("on").siblings().removeClass("on");
			getUserPayStatementCallback.Convert();
		});
		if(look.getHashParam("appid") == ""){return false;}
		$(".result_panel").fadeIn();
		getUserPayStatementRequest(look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("date_from"), look.getHashParam("date_to"), 1);
	},
	//*************************************
	//* 数据分析中心 -> 报表系统
	//*************************************
	statementSystemLoader : function(){
		if($("#statementSystemWrapper").length <=0) {
			loadPage("#wrapper", "data/statement_system.html");
			datepickerGetter();
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		$("#resultLoader").show();
		//加载字典
		initLoader.statementDicLoader();
		
		var getStatementSystemDataFn = function(){
			var to = look.getHashParam("to") == "" ? look.getLocalDate() : look.getHashParam("to"),
				from = look.getHashParam("from") == "" ? look.getLastMonthDate(to) : look.getHashParam("from");
			$("#dataStart").val(from);
			$("#dataEnd").val(to);
		}();
		
		$("#siftSubset").unbind("click").bind("click", function(){
			if($(this).hasClass("a_as_disabled")){return false;}
			var from = $("#dataStart").val(), to = $("#dataEnd").val(),
				appid = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val(),
				type = $("#siftElementSelect").val();
			if(look.getDiffDays(from, to) > 60){look.showInfo.error(look._I18N_DATA.$565/**只能查询间隔60天内的数据…**/);return false;}
			if (appid == "") {look.showInfo.error(look._I18N_DATA.$570/**请选择所有选项…**/);return false;}
			$("#resultLoader").show();
			$(this).addClass("a_as_disabled");
			getStatementSystemDataRequest(from.replace(/-/g, ""), to.replace(/-/g, ""), '&appid=' + appid + '&serverId=' + serverId + '&type=' + type);
		});
	},
	
	/*** data预加载 END ***/
	
	/*** flight_mis预加载 START ***/
	
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 公共函数
	//*************************************
	flightCommonFunction : {
		inputSet : function(){
			$("#userNameInput").val(look.getHashParam("user_name"));
			$("#userIdInput").val(look._FLIGHT_USER_INFO.Get_UID());
			$("#gameIdInput").val(look._FLIGHT_USER_INFO.Get_GID());
		},
		siftSubsetEvent: function(callback){
			$("#siftSubset").unbind("click").bind("click", function(){
				var userId = $.trim($("#userIdInput").val()),
					gameId = $.trim($("#gameIdInput").val());
				if(userId == "" && gameId == ""){look.showInfo.error(look._I18N_DATA.$454/**UID和游戏ID必须填一项…**/);$("#userIdInput").focus();return false;}
				location.hash = look.setParam([["user_id", userId], ["game_id", gameId]], location.hash);
				look._FLIGHT_USER_INFO.Set_UID(userId);
				look._FLIGHT_USER_INFO.Set_GID(gameId);
			});
			if(look._FLIGHT_USER_INFO.Get_GID() == "" && look._FLIGHT_USER_INFO.Get_UID() == ""){return false;}
			eval(callback(look._FLIGHT_USER_INFO.Get_GID(), look._FLIGHT_USER_INFO.Get_UID()));
		},
		siftSubsetEvent2: function(callback){
			$("#siftSubset").unbind("click").bind("click", function(){
				var userId = $.trim($("#userIdInput").val()),
					userName = $.trim($("#userNameInput").val()),
					gameId = $.trim($("#gameIdInput").val());
				if(userId == "" && userName == "" && gameId == ""){look.showInfo.error(look._I18N_DATA.$453/**查询条件必须填一项…**/);$("#userNameInput").focus();return false;}
				location.hash = look.setParam([["user_name", userName], ["user_id", userId], ["game_id", gameId]], location.hash);
				look._FLIGHT_USER_INFO.Set_UID(userId);
				look._FLIGHT_USER_INFO.Set_GID(gameId);
			});
			if(look.getHashParam("user_name") == "" && look._FLIGHT_USER_INFO.Get_GID() == "" && look._FLIGHT_USER_INFO.Get_UID() == ""){return false;}
			eval(callback(look.getHashParam("user_name"), look._FLIGHT_USER_INFO.Get_GID(), look._FLIGHT_USER_INFO.Get_UID()));
		}
	},
	
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 玩家基本信息
	//*************************************
	flightUserInfoLoader : function(){
		if ($("#flightUserInfoWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/user_info.html");
			initLoader.flightCommonFunction.inputSet();
		}
		initLoader.flightCommonFunction.siftSubsetEvent2(flightGetUserInfoRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 玩家日常活动
	//*************************************
	flightUserActivityLoader : function(){
		if ($("#flightUserActivityWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/user_activity.html");
			initLoader.flightCommonFunction.inputSet();
		}
		initLoader.flightCommonFunction.siftSubsetEvent(flightGetUserActivityRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 玩家持有飞机
	//*************************************
	flightUserAircraftLoader : function(){
		if ($("#flightUserAircraftWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/user_aircraft.html");
			initLoader.flightCommonFunction.inputSet();
			if (publicInit.authenCheck(look._AUTHEN.misFlight, 10)) {
				$("#flightAircraftCell").show();
				//字典
				look._FLIGHT_AIRCRAFT_DIC_ARRAY == undefined ? Look.prototype._FLIGHT_AIRCRAFT_DIC_ARRAY = new Array() : null;
				look._FLIGHT_AIRCRAFT_DIC_ARRAY.length == 0 ? flightGetDictionaryRequest(1) : flightGetAircraftDictionaryCallback.Assay();
			}
		}
		//[事件]增加飞机
		$("#addAircraftSubset").unbind("click").bind("click", function(){
			var userId = $.trim($("#userIdInput").val()),
				gameId = $.trim($("#gameIdInput").val()),
				aircraftId = $("#flightAircraftSelect").val(),
				count = $.trim($("#addCountInput").val());
			if($(this).hasClass("a_as_disabled")){return false;}
			if(userId == "" && gameId == ""){look.showInfo.error(look._I18N_DATA.$454/**UID和游戏ID必须填一项…**/);$("#userIdInput").focus();return false;}
			if(aircraftId == ""){look.showInfo.error(look._I18N_DATA.$455/**请选择要添加的飞机类型…**/);return false;}
			if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请选择要添加的数量…**/);$("#addCountInput").focus();return false;}
			if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#addCountInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$812/**确定要给该用户添加飞机？**/ + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					flightAddAircraftRequest(userId, gameId, aircraftId, count);
				}
			});
		});
		initLoader.flightCommonFunction.siftSubsetEvent(flightGetUserAircraftRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 玩家持有建筑
	//*************************************
	flightUserBuildingLoader : function(){
		if ($("#flightUserBuildingWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/user_building.html");
			initLoader.flightCommonFunction.inputSet();
		}
		initLoader.flightCommonFunction.siftSubsetEvent(flightGetUserBuildingRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 玩家道具信息
	//*************************************
	flightUserItemLoader : function(){
		if ($("#flightUserItemWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/user_item.html");
			initLoader.flightCommonFunction.inputSet();
			if (publicInit.authenCheck(look._AUTHEN.misFlight, 12)) {
				$("#flightItemCell").show();
				//字典
				look._FLIGHT_ITEM_DIC_ARRAY == undefined ? Look.prototype._FLIGHT_ITEM_DIC_ARRAY = new Array() : null;
				look._FLIGHT_ITEM_DIC_ARRAY.length == 0 ? flightGetDictionaryRequest(2) : flightGetItemDictionaryCallback.Assay();
			}
		}
		//[事件]增加道具
		$("#addItemSubset").unbind("click").bind("click", function(){
			var userId = $.trim($("#userIdInput").val()),
				gameId = $.trim($("#gameIdInput").val()),
				itemId = $("#flightItemSelect").val(),
				count = $.trim($("#addCountInput").val());
			if($(this).hasClass("a_as_disabled")){return false;}
			if(userId == "" && gameId == ""){look.showInfo.error(look._I18N_DATA.$454/**UID和游戏ID必须填一项…**/);$("#userIdInput").focus();return false;}
			if(itemId == ""){look.showInfo.error(look._I18N_DATA.$458/**请选择要添加的道具类型…**/);return false;}
			if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请选择要添加的数量…**/);$("#addCountInput").focus();return false;}
			if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#addCountInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$813/**确定要给该用户添加道具？**/ + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					flightAddItemRequest(userId, gameId, itemId, count);
				}
			});
		});
		initLoader.flightCommonFunction.siftSubsetEvent(flightGetUserItemRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 玩家自定义道具信息
	//*************************************
	flightUserCustomItemLoader : function(){
		if ($("#flightUserCustomItemWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/user_custom_item.html");
			initLoader.flightCommonFunction.inputSet();
			if (publicInit.authenCheck(look._AUTHEN.misFlight, 18)) {
				$("#flightUserCustomItemCell").show();
			}
		}
		$("#itemTypeSelect option[value='" + look.getHashParam("item_type") + "']").attr("selected", "selected");
		$("#siftSubset").unbind("click").bind("click", function(){
			var userId = $.trim($("#userIdInput").val()),
				gameId = $.trim($("#gameIdInput").val()),
				itemType = $("#itemTypeSelect").val();
			if(userId == "" && gameId == ""){look.showInfo.error(look._I18N_DATA.$454/**UID和游戏ID必须填一项…**/);$("#userIdInput").focus();return false;}
			if(itemType == ""){look.showInfo.error(look._I18N_DATA.$534/**请选择道具类型…**/);return false;}
			location.hash = look.setParam([["user_id", userId], ["game_id", gameId], ["item_type", itemType]], location.hash);
			look._FLIGHT_USER_INFO.Set_UID(userId);
			look._FLIGHT_USER_INFO.Set_GID(gameId);
		});
		//[事件]获取相关字典
		$("#flightUserCustomItemTypeSelect").bind("change", function(){
			var itemType = parseInt($(this).children("option:selected").attr("d_type")), dicVar = null;
			switch(itemType){
				case 6 : 
					look._FLIGHT_CUSTOM_ITEM_6_DIC_ARRAY == undefined ? Look.prototype._FLIGHT_CUSTOM_ITEM_6_DIC_ARRAY = new Array() : null;
					dicVar = look._FLIGHT_CUSTOM_ITEM_6_DIC_ARRAY;
				break;
				case 7 : 
					look._FLIGHT_CUSTOM_ITEM_7_DIC_ARRAY == undefined ? Look.prototype._FLIGHT_CUSTOM_ITEM_7_DIC_ARRAY = new Array() : null;
					dicVar = look._FLIGHT_CUSTOM_ITEM_7_DIC_ARRAY;
				break;
				default : $("#flightItemSelect").hide();return;
			}
			dicVar.length == 0 ? flightGetDictionaryRequest(itemType) : flightGetCustomItemDictionaryCallback.Assay(dicVar);
		});
		//[事件]添加自定义道具
		$("#addCustomItemSubset").unbind("click").bind("click", function(){
			var userId = $.trim($("#userIdInput").val()),
				gameId = $.trim($("#gameIdInput").val()),
				itemType = $("#flightUserCustomItemTypeSelect").val(),
				itemId = $("#flightItemSelect").val(),
				count = $.trim($("#addCountInput").val());
			if($(this).hasClass("a_as_disabled")){return false;}
			if(userId == "" && gameId == ""){look.showInfo.error(look._I18N_DATA.$454/**UID和游戏ID必须填一项…**/);$("#userIdInput").focus();return false;}
			if(itemType == ""){look.showInfo.error(look._I18N_DATA.$458/**请选择要添加的道具类型…**/);return false;}
			if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请选择要添加的数量…**/);$("#addCountInput").focus();return false;}
			if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#addCountInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$846/**确定要给该用户添加该自定义道具？**/ + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					flightAddCustomItemRequest(userId, gameId, itemType, itemId, count);
				}
			});
		});
		if(look._FLIGHT_USER_INFO.Get_GID() == "" && look._FLIGHT_USER_INFO.Get_UID() == "" || look.getHashParam("item_type") == ""){return false;}
		flightGetUserCustomItemRequest(look._FLIGHT_USER_INFO.Get_GID(), look._FLIGHT_USER_INFO.Get_UID(), look.getHashParam("item_type"));
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 玩家战斗机信息
	//*************************************
	flightUserFighterLoader : function(){
		if ($("#flightUserFighterWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/user_fighter.html");
			initLoader.flightCommonFunction.inputSet();
			if (publicInit.authenCheck(look._AUTHEN.misFlight, 19)) {
				$("#flightUserFighterCell").show();
				look._FLIGHT_FIGHTER_DIC_ARRAY == undefined ? Look.prototype._FLIGHT_FIGHTER_DIC_ARRAY = new Array() : null;
				look._FLIGHT_FIGHTER_DIC_ARRAY.length == 0 ? flightGetDictionaryRequest(8) : flightGetFighterDictionaryCallback.Assay();
			}
		}
		//[事件]添加战斗机
		$("#addFighterSubset").unbind("click").bind("click", function(){
			var userId = $.trim($("#userIdInput").val()),
				gameId = $.trim($("#gameIdInput").val()),
				itemId = $("#flightUserFighterSelect").val(),
				count = $.trim($("#addCountInput").val());
			if($(this).hasClass("a_as_disabled")){return false;}
			if(userId == "" && gameId == ""){look.showInfo.error(look._I18N_DATA.$454/**UID和游戏ID必须填一项…**/);$("#userIdInput").focus();return false;}
			if(itemId == ""){look.showInfo.error(look._I18N_DATA.$537/**请选择要添加的战机…**/);return false;}
			if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请选择要添加的数量…**/);$("#addCountInput").focus();return false;}
			if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#addCountInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$847/**确定要给该用户添加战斗机？**/ + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					flightAddFighterRequest(userId, gameId, itemId, count);
				}
			});
		});
		initLoader.flightCommonFunction.siftSubsetEvent(flightGetUserFighterRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 战斗信息
	//*************************************
	flightUserCombatLoader : function(){
		if ($("#flightUserCombatWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/user_combat.html");
			initLoader.flightCommonFunction.inputSet();
		}
		initLoader.flightCommonFunction.siftSubsetEvent2(flightGetUserCombatRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 经验活动配置
	//*************************************
	flightActConfigLoader : function(){
		if ($("#flightSendPushWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/act_config.html");
			if (publicInit.authenCheck(look._AUTHEN.misFlight, 22)) {$("#flightActivityConfigCell").show();}
		}
		//[事件]新增
		$("#addActivityConfigSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 462,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_activity_config_poper look_box_corner",
						contentHtml: text
					});
					eval(callback());
				});
			}
			var addActivityConfigCallback = function(){
				$("#uptimesInput").focus();
				publicInit.inputTipStyle("#addActivityConfigPanel input.text, #addActivityConfigPanel textarea", "#addActivityConfigPanel label tt");
				datepickerGetter('#startDateInput, #endDateInput', null);
				//[事件]确认新增经验活动配置
				$("#comfirmAddActivityConfigSubset").unbind("click").bind("click", function(){
					var ifBlank = false;
					$("#addActivityConfigPanel *[name]").each(function(){
						if($.trim($(this).val()) == ""){ifBlank = true;$(this).focus();return false;}
					});
					if(ifBlank){look.showInfo.error(look._I18N_DATA.$484/**所有输入项都不能为空…**/);return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$854/**确定新增本条经验活动配置？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							flightCreateActConfigRequest($("#addActivityConfigForm").serialize());
						}
					});
				});
			}
			getPoperRequest($(this), "game_account/flight/add_activity_config_poper.html", addActivityConfigCallback);
		});
		
		$("#flightActConfigList").html('<p class="load_result"><img src="../images/small_loader.gif" /><br/>' + look._I18N_DATA.$629/**查询中…**/ + '</p>');
		flightGetActConfigRequest();
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 发送PUSH
	//*************************************
	flightSendPushLoader : function(){
		if ($("#flightSendPushWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/send_push.html");
			$("#chineseTextarea").focus();
			publicInit.inputTipStyle("label input.text, label textarea", ".publisher_cell label tt");
			contrastDatepickerGetter("#dateInput");
			//[事件]清空时间事件
			$("#clearDateSubset").unbind("click").bind("click", function(){$("#dateInput").val("");});
		}
		//[事件]发送push
		$("#sendPushSubset").unbind("click").bind("click", function(){
			var type = $.trim($("#typeSelect").val()),
				msgCn = $.trim($("#chineseTextarea").val()),
				msgTw = $.trim($("#traditionalChineseTextarea").val()),
				msgEn = $("#englishTextarea").val(),
				date = $.trim($("#dateInput").val());
			if(msgCn == "" || msgTw == "" || msgEn == ""){look.showInfo.error(look._I18N_DATA.$459/**所有语言的push内容均为必填项…**/);$("#chineseTextarea").focus();return false;}
			if(type == ""){look.showInfo.error(look._I18N_DATA.$460/**请选择Push类型…**/);return false;}
			if(date == ""){look.showInfo.error(look._I18N_DATA.$461/**请选择最后登录时间限制…**/);return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$814/**确定发送本次PUSH？**/ + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled").text(look._I18N_DATA.$628/**正在发送…**/);
					flightSendPushRequest(type, msgCn, msgTw, msgEn, date);
				}
			});
		});
	},
	//*************************************
	//* 游戏帐号管理系统 -> 航空 -> 系统维护
	//*************************************
	flightMaintenanceLoader : function(){
		if ($("#flightMaintenanceWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/flight/maintenance.html");
		}
		flightMaintenanceRequest();
	},
	
	/*** flight_mis预加载 END ***/
	
	/*** sail_mis预加载 START ***/
	
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 公共函数
	//*************************************
	sailCommonFunction : {
		inputSet : function(){
			var localeId = look._SAIL_USER_INFO.Get_SERVER() ? look._SAIL_USER_INFO.Get_SERVER() : look.getHashParam("locale_id"),
				userId = look._SAIL_USER_INFO.Get_UID() ? look._SAIL_USER_INFO.Get_UID() : look.getHashParam("user_id"),
				playerId = look._SAIL_USER_INFO.Get_PID() ? look._SAIL_USER_INFO.Get_PID() : look.getHashParam("player_id");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.AssayGame(localeId);
			$("#userNameInput").val(look.getHashParam("user_name"));
			$("#userIdInput").val(userId);
			$("#playerIdInput").val(playerId);
		},
		siftSubsetEvent : function(callback){
			this.inputSet();
			$("#siftSubset").unbind("click").bind("click", function(){
				var localeId = $("#localeIdSelect").val(),
					userId = $.trim($("#userIdInput").val()),
					playerId = $.trim($("#playerIdInput").val());
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				if(userId == "" && playerId == ""){look.showInfo.error(look._I18N_DATA.$453/**查询条件必须填一项…**/);$("#playerIdInput").focus();return false;}
				location.hash = look.setParam([["locale_id", localeId], ["user_id", userId], ["player_id", playerId]], location.hash);
				look._SAIL_USER_INFO.Set_SERVER(localeId);
				look._SAIL_USER_INFO.Set_UID(userId);
				look._SAIL_USER_INFO.Set_PID(playerId);
			});
			if(look._SAIL_USER_INFO.Get_SERVER() == "" || look._SAIL_USER_INFO.Get_PID() == "" && look._SAIL_USER_INFO.Get_UID() == ""){return false;}
			eval(callback(look._SAIL_USER_INFO.Get_SERVER(), look._SAIL_USER_INFO.Get_PID(), look._SAIL_USER_INFO.Get_UID()));
		},
		siftSubsetEvent_2 : function(callback){
			this.inputSet();
			$("#siftSubset").unbind("click").bind("click", function(){
				var localeId = $("#localeIdSelect").val(),
					userId = $.trim($("#userIdInput").val()),
					userName = $.trim($("#userNameInput").val()),
					playerId = $.trim($("#playerIdInput").val());
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				if(userId == "" && userName == "" && playerId == ""){look.showInfo.error(look._I18N_DATA.$453/**查询条件必须填一项…**/);$("#userNameInput").focus();return false;}
				location.hash = look.setParam([["locale_id", localeId], ["user_name", userName], ["user_id", userId], ["player_id", playerId]], location.hash);
				look._SAIL_USER_INFO.Set_SERVER(localeId);
				look._SAIL_USER_INFO.Set_UID(userId);
				look._SAIL_USER_INFO.Set_PID(playerId);
			});
			if(look._SAIL_USER_INFO.Get_SERVER() == "" || (look.getHashParam("user_name") == "" && look._SAIL_USER_INFO.Get_PID() == "" && look._SAIL_USER_INFO.Get_UID() == "")){return false;}
			eval(callback(look._SAIL_USER_INFO.Get_SERVER(), look.getHashParam("user_name"), look._SAIL_USER_INFO.Get_PID(), look._SAIL_USER_INFO.Get_UID()));
		},
		chooseUserOperate : {
			init: function(){
				look._SAIL_CHOOSED_USER_ARRAY ? "" : Look.prototype._SAIL_CHOOSED_USER_ARRAY = new Array();
				$.cookie('sail_choosed_user') ? look._SAIL_CHOOSED_USER_ARRAY = JSON.parse($.cookie('sail_choosed_user')) : "";
			},
			add: function(userId){
				for (var j = 0; j < look._SAIL_CHOOSED_USER_ARRAY.length; j++) {
					if (userId == look._SAIL_CHOOSED_USER_ARRAY[j]) {
						return;
					}
				}
				look._SAIL_CHOOSED_USER_ARRAY.push(userId);
			},
			remove: function(userId){
				look._SAIL_CHOOSED_USER_ARRAY = $.grep(look._SAIL_CHOOSED_USER_ARRAY, function(n, i){
					return n == userId;
				}, true);
			},
			clear: function(){
				look._SAIL_CHOOSED_USER_ARRAY.length = 0;
			},
			set: function(){
				$.cookie("sail_choosed_user", JSON.stringify(look._SAIL_CHOOSED_USER_ARRAY));
			},
			assy: function(){
				look._SAIL_CHOOSED_USER_ARRAY.length > 0 ? $("#batchUserCell").fadeIn() : $("#batchUserCell").hide();
				$("#batchListPanel").html("");
				$.map(look._SAIL_CHOOSED_USER_ARRAY, function(n){
					$("#batchListPanel").prepend('<label><input type="checkbox" class="checkbox" checked="checked" p_id="' + n + '">' + n + '</label>');
				});
				//[事件]已选择的信息
				$("#batchListPanel input.checkbox").unbind("click").bind("click", function(){
					var pId = $(this).attr("p_id");
					if (!$(this).is(":checked")) {
						initLoader.sailCommonFunction.chooseUserOperate.remove(pId);
						initLoader.sailCommonFunction.chooseUserOperate.set();
					}
					$("#sailUserInfoList input.checkbox").each(function(){
						$(this).attr("checked",false);
						var obj = $(this);
						$.map(look._SAIL_CHOOSED_USER_ARRAY, function(n){
							if(n == obj.attr("p_id")){
								obj.attr("checked",true);
							}
						});
					});
					initLoader.sailCommonFunction.chooseUserOperate.assy();
				});
				//[事件]取消全部选择按钮
				$("#cancelAllBatchUserSubset").unbind("click").bind("click", function(){
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$815/**确定清除所有已选择的玩家？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							initLoader.sailCommonFunction.chooseUserOperate.clear();
							initLoader.sailCommonFunction.chooseUserOperate.set();
							initLoader.sailCommonFunction.chooseUserOperate.assy();
							$("#sailUserInfoList input.checkbox").attr("checked", false);
							look.showInfo.right(look._I18N_DATA.$463/**已清除全部选择的玩家…**/);
							$.clearPop();
						}
					});
				});
			},
			doPop: function(title, callback){
				var chooseUserIdHtml = new Array();
				$.lookPop({
					title: title,
					url: "game_account/sail/choose_user_poper.html",
					callback: function(){
						for(var i = 0; i < look._SAIL_CHOOSED_USER_ARRAY.length; i++){
							chooseUserIdHtml.push(look._SAIL_CHOOSED_USER_ARRAY[i]);
						}
						//[事件]输入框键入
						$("#chooseUserIdTextarea").bind("blur", function(){
							var choosedArray = look.trimAll($(this).val()).replace(/[(^*\n*)|(^*\r*)]/g, "").replace(/[,]+$/, "").split(/[,]+/g);
							initLoader.sailCommonFunction.chooseUserOperate.clear();
							if (look.trimAll($(this).val()) != 0) {
								for (var i = 0; i < choosedArray.length; i++) {
									initLoader.sailCommonFunction.chooseUserOperate.add(choosedArray[i]);
								}
							}
							initLoader.sailCommonFunction.chooseUserOperate.set();
							initLoader.sailCommonFunction.chooseUserOperate.assy();
							setPreviewFn();
						}).val(chooseUserIdHtml);
						publicInit.inputTipStyle("#chooseUserPoper textarea", "#chooseUserPoper label tt");
						//设置预览
						var setPreviewFn = function(){
							$("#chooseUserIdPreviewCell").text("");
							for (var i = 0; i < look._SAIL_CHOOSED_USER_ARRAY.length; i++) {
								$("#chooseUserIdPreviewCell").append('<div class="choose_element look_box_corner"><span>' + look._SAIL_CHOOSED_USER_ARRAY[i] + '</span></div>');
							}
						};
						setPreviewFn();
						//[事件]确认发送
						$("#popConfirmSendSubset").unbind("click").bind("click", function(){
							if($(this).hasClass("a_as_disabled")){return false;}
							if(look._SAIL_CHOOSED_USER_ARRAY.length == 0){look.showInfo.error(look._I18N_DATA.$512/**请至少输入一个用户id…**/);$("#chooseUserIdTextarea").focus();return false;}
							$(this).addClass("a_as_disabled");
							callback();
						});
					}
				});
			}
		}
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 玩家信息
	//*************************************
	sailUserInfoLoader : function(){
		if ($("#sailUserInfoWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/user_info.html");
		}
		initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetUserInfoRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 商船管理
	//*************************************
	sailMerchantShipLoader : function(){
		if ($("#sailMerchantShipWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/merchant_ship.html");
		}
		//[事件]增加商船
		$("#addMerchantShipSubset").unbind("click").bind("click", function(){
			if($(this).hasClass("a_as_disabled")){return false;}
			var shipId = $("#sailMerchantShipSelect").val(),
				shipName = $("#sailMerchantShipSelect option:selected").text(),
				count = $.trim($("#addCountInput").val());
			if(shipId == ""){look.showInfo.error(look._I18N_DATA.$7026/**请选择要添加的商船类型…**/);return false;}
			if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请选择要添加的数量…**/);$("#addCountInput").focus();return false;}
			if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#addCountInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$825/**确定要给该用户添加{num}个{type}？**/.replace(/{num}/ig, '<b class="color_green">' + count + '</b>').replace(/{type}/ig, '<b class="color_yellow">' + shipName + '</b>') + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					sailAddMerchantShipRequest(shipId, count);
				}
			});
		});
		initLoader.sailCommonFunction.siftSubsetEvent(sailGetMerchantShipRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 航线信息
	//*************************************
	sailUserLaneLoader : function(){
		if ($("#sailUserLaneWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/user_lane.html");
		}
		initLoader.sailCommonFunction.siftSubsetEvent(sailGetUserLaneRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 建筑信息
	//*************************************
	sailUserBuildLoader : function(){
		if ($("#sailUserBuildWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/user_build.html");
		}
		//[事件]增加建筑
		$("#addBuildingSubset").unbind("click").bind("click", function(){
			if($(this).hasClass("a_as_disabled")){return false;}
			var buildingId = $("#sailBuildingSelect").val(),
				buildingName = $("#sailBuildingSelect option:selected").text(),
				count = $.trim($("#addCountInput").val());
			if(buildingId == ""){look.showInfo.error(look._I18N_DATA.$7025/**请选择要添加的建筑类型…**/);return false;}
			if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请选择要添加的数量…**/);$("#addCountInput").focus();return false;}
			if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#addCountInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$825/**确定要给该用户添加{num}个{type}？**/.replace(/{num}/ig, '<b class="color_green">' + count + '</b>').replace(/{type}/ig, '<b class="color_yellow">' + buildingName + '</b>') + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					sailAddUserBuildRequest(buildingId, count);
				}
			});
		});
		initLoader.sailCommonFunction.siftSubsetEvent(sailGetUserBuildRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 能量数据
	//*************************************
	sailEnergyDataLoader : function(){
		if ($("#sailEnergyDataWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/energy_data.html");
		}
		initLoader.sailCommonFunction.siftSubsetEvent(sailGetEnergyDataRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 战船管理
	//*************************************
	sailBattleShipLoader : function(){
		if ($("#sailBattleShipWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/battle_ship.html");
		}
		//[事件]战船适配技能
		$("#sailBattleShipSelect").bind("change", function(){
			var battleShipId = $(this).val(),
				dic = look._SAIL_EXTEND_DIC["battleShipShootType"],
				element = $("#sailBattleSkillSelect");
			element.children().first().nextAll().remove();
			for(id in dic){
				if(id == battleShipId){
					$.each(dic[id], function(i, list){
						element.append('<option value="' + list.id + '" title="' + list.name+ '">' + list.name + '</option>');
					});
					return;
				}
			};
		});
		//[事件]查询战船零件信息
		$("#viewPartSubset").unbind("click").bind("click", function(){
			var offLeft = $(this).offset().left,
				offTop = $(this).offset().top + 22;
			$.lookPop({
				url: "game_account/sail/battle_part_poper.html",
				title: look._I18N_DATA.$1280/**战船零件信息**/,
				id: "sailBattlePartPoper",
				callback: function(){
					sailExtendDictionaryCallback.Check("battlepart", sailExtendDictionaryCallback.Assay, "select");
					initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetBattlePartRequest);
					//[事件]添加战船零件
					if(publicInit.authenCheck(look._AUTHEN.misSail, 97)){$("#poperSailBattlePartCell").show();}
					$("#poperAddBattlePartSubset").unbind("click").bind("click", function(){
						var userId = $.trim($("#userIdInput").val()),
							partId = $("#poperSailBattlePartSelect").val(),
							partName = $("#poperSailBattlePartSelect option:selected").text(),
							count = $.trim($("#poperAddCountInput").val()),
							param = $(this).parent("form").serialize();
						if(userId == ""){look.showInfo.error(look._I18N_DATA.$7024/**请输入角色ID…**/);$("#userIdInput").focus();return false;}
						if(partId == ""){look.showInfo.error(look._I18N_DATA.$7031/**请选择要添加的战船零件类型…**/);return false;}
						if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请输入要添加的数量…**/);$("#poperAddCountInput").focus();return false;}
						if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#poperAddCountInput").focus();return false;}
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$66/**提醒**/,
							clear: false,
							html:
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$825/**确定要给该用户添加{num}个{type}？**/.replace(/{num}/ig, '<b class="color_green">' + count + '</b>').replace(/{type}/ig, '<b class="color_yellow">' + partName + '</b>') + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								if(obj.hasClass("a_as_disabled")){return false;}
								obj.addClass("a_as_disabled");
								sailAddBattlePartRequest(param);
							}
						});
					});
				}
			});
		});
		//[事件]查询木材信息
		$("#viewWoodsSubset").unbind("click").bind("click", function(){
			var offLeft = $(this).offset().left,
				offTop = $(this).offset().top + 22;
			$.get("game_account/sail/woods_poper.html", function(text){
				$.lookPopDiv({left: offLeft,top: offTop,contentHtml: text});
				initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetWoodsRequest);
				//[事件]添加木材
				if(publicInit.authenCheck(look._AUTHEN.misSail, 96)){$("#poperSailWoodsCell").show();}
				$("#poperAddWoodsSubset").unbind("click").bind("click", function(){
					var count = $.trim($("#poperAddCountInput").val());
					if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请输入要添加的数量…**/);$("#poperAddCountInput").focus();return false;}
					if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#poperAddCountInput").focus();return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$825/**确定要给该用户添加{num}个{type}？**/.replace(/{num}/ig, '<b class="color_green">' + count + '</b>').replace(/{type}/ig, '<b class="color_yellow">' + look._I18N_DATA.$1283/**木材**/ + '</b>') + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							sailAddWoodsRequest(count);
						}
					});
				});
			});
		});
		//[事件]增加战船
		$("#addBattleShipSubset").unbind("click").bind("click", function(){
			var shipId = $("#sailBattleShipSelect").val(),
				shipName = $("#sailBattleShipSelect option:selected").text(),
				skillId = $("#sailBattleSkillSelect").val(),
				skillName = $("#sailBattleSkillSelect option:selected").text(),
				level = $.trim($("#addLevelInput").val()),
				count = $.trim($("#addCountInput").val()),
				param = $(this).parent("form").serialize();
			if(shipId == ""){look.showInfo.error(look._I18N_DATA.$7027/**请选择要添加的战船类型…**/);return false;}
			if(skillId == ""){look.showInfo.error(look._I18N_DATA.$7028/**请选择要添加的战船技能…**/);return false;}
			if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请选择要添加的数量…**/);$("#addCountInput").focus();return false;}
			if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#addCountInput").focus();return false;}
			if(level == ""){look.showInfo.error(look._I18N_DATA.$7029/**请输入要添加的战船级别…**/);$("#addLevelInput").focus();return false;}
			if(isNaN(level)){look.showInfo.error(look._I18N_DATA.$7030/**添加的战船级别必须为数字…**/);$("#addLevelInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$825/**确定要给该用户添加{num}个{type}？**/.replace(/{num}/ig, '<b class="color_green">' + count + '</b>').replace(/{type}/ig, '<b class="color_yellow">' + shipName + '</b>') + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					sailAddBattleShipRequest(param);
				}
			});
		});
		initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetBattleShipRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 战斗道具管理
	//*************************************
	sailBattleItemLoader : function(){
		if ($("#sailBattleItemWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/battle_item.html");
		}
		//[事件]有效期种类适配
		$("#sailBattleValidTypeSelect").bind("change", function(){
			$(this).val() == "1" ? $("#sailAddDayCell").fadeOut() : $("#sailAddDayCell").fadeIn();
		});
		//[事件]增加战斗道具
		$("#addBattleItemSubset").unbind("click").bind("click", function(){
			var itemId = $("#sailBattleItemSelect").val(),
				itemName = $("#sailBattleItemSelect option:selected").text(),
				validType = $("#sailBattleValidTypeSelect").val(),
				validName = $("#sailBattleValidTypeSelect option:selected").text(),
				dayNum = $.trim($("#addDayInput").val()),
				param = $(this).parent("form").serialize();
			if(itemId == ""){look.showInfo.error(look._I18N_DATA.$7032/**请选择要添加的战斗道具类型…**/);return false;}
			if(validType != "1" && dayNum == ""){look.showInfo.error(look._I18N_DATA.$7033/**请输入有效天数…**/);$("#addDayInput").focus();return false;}
			if(dayNum != "" && isNaN(dayNum)){look.showInfo.error(look._I18N_DATA.$7034/**有效天数必须为数字…**/);$("#addDayInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$834/**确定要给该用户添加{word}的{type}？**/.replace(/{word}/ig, '<b class="color_red">[' + validName + ']</b>').replace(/{type}/ig, '<b class="color_yellow">' + itemName + '</b>') + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					sailAddBattleItemRequest(param);
				}
			});
		});
		initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetBattleItemRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 货物管理
	//*************************************
	sailGoodsManageLoader: function(){
		if ($("#sailGoodsWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/goods_manage.html");
		}
		//[事件]增加货物
		$("#addGoodsSubset").unbind("click").bind("click", function(){
			var goodId = $("#sailGoodsSelect").val(),
				goodName = $("#sailGoodsSelect option:selected").text(),
				count = $.trim($("#addCountInput").val()),
				param = $(this).parent("form").serialize();
			if(goodId == ""){look.showInfo.error(look._I18N_DATA.$7036/**请选择要添加的货物类型…**/);return false;}
			if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请输入要添加的数量…**/);$("#addCountInput").focus();return false;}
			if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#addCountInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$825/**确定要给该用户添加{num}个{type}？**/.replace(/{num}/ig, '<b class="color_green">' + count + '</b>').replace(/{type}/ig, '<b class="color_yellow">' + goodName + '</b>') + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					sailAddGoodsRequest(param);
				}
			});
		});
		initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetGoodsRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 声望管理
	//*************************************
	sailReputationManageLoader : function(){
		if ($("#sailReputationWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/reputation_manage.html");
			if (publicInit.authenCheck(look._AUTHEN.misSail, 106)) {
				$("#sailReputationCell").show();
			}
		}
		//[事件]增加声望
		$("#addReputationSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val(),
				userId = $.trim($("#userIdInput").val()),
				country = $("#sailCountrySelect").val(),
				count = $.trim($("#addCountInput").val()),
				param = $(this).parent("form").serialize();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);$("#localeIdSelect").focus();return false;}
			if(userId == ""){look.showInfo.error(look._I18N_DATA.$7024/**请输入角色ID…**/);$("#userIdInput").focus();return false;}
			if(country == ""){look.showInfo.error(look._I18N_DATA.$7037/**请选择要添加的声望的国家…**/);return false;}
			if(count == ""){look.showInfo.error(look._I18N_DATA.$456/**请输入要添加的数量…**/);$("#addCountInput").focus();return false;}
			if(isNaN(count)){look.showInfo.error(look._I18N_DATA.$457/**添加的数量必须为数字…**/);$("#addCountInput").focus();return false;}
			look._SAIL_USER_INFO.Set_SERVER(localeId);
			look._SAIL_USER_INFO.Set_UID(userId);
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$825/**确定要给该用户添加{num}个{type}？**/.replace(/{num}/ig, '<b class="color_green">' + count + '</b>').replace(/{type}/ig, '<b class="color_yellow">' + look._I18N_DATA.$1294/**声望**/ + '</b>') + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					sailAddReputationRequest(param);
				}
			});
		});
		initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetReputationRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 任务管理
	//*************************************
	sailTaskManageLoader : function(){
		if ($("#sailTaskWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/task_manage.html");
			if (publicInit.authenCheck(look._AUTHEN.misSail, 109)) {
				$("#sailTaskCell").show();
			}
		}
		//[事件]接受任务
		$("#addTaskSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val(),
				userId = $.trim($("#userIdInput").val()),
				taskId = $.trim($("#addTaskIDInput").val()),
				param = $(this).parent("form").serialize();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);$("#localeIdSelect").focus();return false;}
			if(userId == ""){look.showInfo.error(look._I18N_DATA.$7024/**请输入角色ID…**/);$("#userIdInput").focus();return false;}
			if(taskId == ""){look.showInfo.error(look._I18N_DATA.$7038/**请输入要添加的任务类型ID…**/);$("#addTaskIDInput").focus();return false;}
			if(isNaN(taskId)){look.showInfo.error(look._I18N_DATA.$7039/**添加的任务类型ID必须为数字…**/);$("#addTaskIDInput").focus();return false;}
			look._SAIL_USER_INFO.Set_SERVER(localeId);
			look._SAIL_USER_INFO.Set_UID(userId);
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$834/**确定要给该用户添加{word}的{type}？**/.replace(/{word}/ig, '<b class="color_green">' + taskId + '</b>').replace(/{type}/ig, '<b class="color_yellow">' + look._I18N_DATA.$1021/**任务**/ + '</b>') + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					sailAddTaskRequest(param);
				}
			});
		});
		initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetTaskRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 军阶管理
	//*************************************
	sailBattleMarkLoader : function(){
		if ($("#sailBattleMarkWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/battle_mark.html");
		}
		initLoader.sailCommonFunction.siftSubsetEvent_2(sailGetBattleMarkRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 排行榜管理
	//*************************************
	sailRankManageLoader : function(){
		if ($("#sailRankManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/rank_manage.html");
			datepickerGetter("#dateInput");
			publicInit.authenCheck(look._AUTHEN.misSail, 112) ? $("#viewCombatTillNowCell").show() : null;
			publicInit.authenCheck(look._AUTHEN.misSail, 113) ? $("#viewDayBuyRankTimeCell").show() : null;
			publicInit.authenCheck(look._AUTHEN.misSail, 114) ? $("#viewDayConsumeRankTimeCell").show() : null;
		}
		initLoader.sailCommonFunction.inputSet();
		$("#dateInput").val(look.getHashParam("date"))
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val(),
				date = $.trim($("#dateInput").val());
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			if(date == ""){look.showInfo.error(look._I18N_DATA.$7040/**请选择日期…**/);$("#dateInput").focus();return false;}
			location.hash = look.setParam([["locale_id", localeId], ["date", date]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(localeId);
		});
		//[事件]查询历史最高战斗力排行榜
		$("#viewCombatTillNowSubset").unbind("click").bind("click", function(){
			var offLeft = $(this).offset().left,
				offTop = $(this).offset().top + 22;
			$.lookPopDiv({
				left: offLeft,
				top: offTop,
				contentHtml: 
					'<div class="envelop_poper"><div style="max-height:400px;min-width:800px;overflow-y:auto;">' +
					'<table cellpadding="0" cellspacing="0" class="list">' +
					'	<thead>' +
					'		<tr>' +
					'			<th>' + look._I18N_DATA.$712/**编号**/ + '</th>' +
					'			<th>' + look._I18N_DATA.$1301/**玩家ID**/ + '</th>' +
					'			<th>' + look._I18N_DATA.$1303/**玩家名称**/ + '</th>' +
					'			<th>' + look._I18N_DATA.$1304/**玩家历史最高战斗力**/ + '</th>' +
					'			<th>' + look._I18N_DATA.$1305/**最高战斗力更新时间**/ + '</th>' +
					'		</tr>' +
					'	</thead>' +
					'	<tbody id="sailCombatTillNowPoperList">' +
					'		<tr><td colspan="5"><img src="../images/small_loader.gif" /></td></tr>' +
					'	</tbody>' +
					'</table>' +
					'</div><div class="pager_cell" style="margin:0;margin-top:15px;"><div class="pager"></div></div></div>'
			});
			sailGetCombatTillNowRequest(1)
		});
		//[事件]查询每日充值排行榜时间&每日消费排行榜时间
		$("#viewDayBuyRankTimeSubset, #viewDayConsumeRankTimeSubset").unbind("click").bind("click", function(){
			var rankType = $(this).attr("rank_type"),
				offLeft = $(this).offset().left,
				offTop = $(this).offset().top + 22;
			$.lookPopDiv({
				left: offLeft,
				top: offTop,
				contentHtml: '<div class="envelop_poper"><div class="envelop_poper_in" id="sailRankPoper"><img src="../images/small_loader.gif" /></div></div>'
			});
			switch (rankType){
				case "buy" : sailGetDayBuyRankTimeRequest();
				break;
				case "consume" : sailGetDayConsumRankTimeRequest();
				break;
			}
		});
		if(look._SAIL_USER_INFO.Get_SERVER() == "" || look.getHashParam("date") == ""){return false;}
		sailGetRankRequest(look.getHashParam("date").replace(/-/ig, ""))
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 礼包信息
	//*************************************
	sailUserGiftbagLoader : function(){
		if ($("#sailUserGiftbagWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/user_giftbag.html");
		}
		initLoader.sailCommonFunction.siftSubsetEvent(sailGetUserGiftbagRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 礼包类型
	//*************************************
	sailGiftBagManageLoader : function(){
		if ($("#sailGiftBagWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/gift_bag_manage.html");
			initLoader.sailCommonFunction.inputSet();
			$("#giftBagName").focus();
			publicInit.inputTipStyle("#sailEditorWrapper label input.text, #sailEditorWrapper label textarea", "#sailEditorWrapper .publisher_cell label tt");
			if(publicInit.authenCheck(look._AUTHEN.misSail, 32)){$("#modifysailGiftBagCell").show().next().removeClass("no_margin");}
		}
		//[事件]打开修改
		$("#openModifySubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);$("#localeIdSelect").focus();return false;}
			$(this).parent().slideUp().next().slideDown(function(){
				$("#sendGiftBagSubset").hide();$("#modifyGiftBagSubset").show();
				$("#localeIdSelect").attr("disabled", "disabled");
			});
			if(look._SAIL_USER_INFO.Get_SERVER() && look._SAIL_USER_INFO.Get_SERVER() != localeId){
				look._SAIL_GIFT_BAG_DIC_ARRAY.length = 0;
				$("#sailGiftBagSelect").children().nextAll().remove();
			}
			//礼包字典
			look._SAIL_GIFT_BAG_DIC_ARRAY.length == 0 ? sailGetDictionaryRequest("gift_bag", localeId) : sailGiftBagDictionaryCallback.Assay();
		});
		//[事件]关闭修改
		$("#cancelModifySubset").unbind("click").bind("click", function(){
			$(this).parent().slideUp().prev().slideDown(function(){
				$("#sendGiftBagSubset").show();$("#modifyGiftBagSubset").hide();
				$("#localeIdSelect").removeAttr("disabled", "disabled");
				$("#sailGiftBagSelect, #giftBagName, #prizeId, #emailId, #giftBagDescription").val("");
				publicInit.inputTipStyle("#sailEditorWrapper label input.text, #sailEditorWrapper label textarea", "#sailEditorWrapper .publisher_cell label tt");
				$("#giftBagName").focus();
			});
		});
		function giftBagEvent(localeId, giftBagId, giftBagName, prizeId, emailId, giftBagDescription){
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			if($("#sailGiftBagSelect").is(":visible") && giftBagId == ""){look.showInfo.error(look._I18N_DATA.$464/**"请选择一个已有礼包…"**/);return false;}
			if(giftBagName == ""){look.showInfo.error(look._I18N_DATA.$465/**"请填写礼包名称…"**/);$("#giftBagName").focus();return false;}
			if(look.getByteLen(giftBagName) > 20){look.showInfo.error(look._I18N_DATA.$466/**"礼包名称不能超过20个字符…"**/);$("#giftBagName").focus();return false;}
			if(prizeId == ""){look.showInfo.error(look._I18N_DATA.$467/**"请填写奖品ID…"**/);$("#prizeId").focus();return false;}
			if(emailId == ""){look.showInfo.error(look._I18N_DATA.$468/**"请填写邮件ID…"**/);$("#emailId").focus();return false;}
			if(isNaN(emailId)){look.showInfo.error(look._I18N_DATA.$469/**"邮件ID必须为数字…"**/);$("#emailId").focus();return false;}
			if(giftBagDescription == ""){look.showInfo.error(look._I18N_DATA.$470/**"请填写描述…"**/);$("#giftBagDescription").focus();return false;}
			if(look.getByteLen(giftBagDescription) > 500){look.showInfo.error(look._I18N_DATA.$471/**"描述不能超过500字符…"**/);$("#giftBagDescription").focus();return false;}
			return true;
		}
		//[事件]提交新增/修改礼包
		$("#sendGiftBagSubset, #modifyGiftBagSubset").unbind("click").bind("click", function(){
			if($(this).hasClass("a_as_disabled")){return false;}
			var localeId = $("#localeIdSelect").val(),
				giftBagId = $("#sailGiftBagSelect").val(),
				giftBagName = $.trim($("#giftBagName").val()),
				prizeId = $.trim($("#prizeId").val()),
				emailId = $.trim($("#emailId").val()),
				giftBagDescription = $.trim($("#giftBagDescription").val());
			if(giftBagEvent(localeId, giftBagId, giftBagName, prizeId, emailId, giftBagDescription)){
				$(this).addClass("a_as_disabled");
				look._SAIL_USER_INFO.Set_SERVER(localeId);
				sailCreateModifyGiftBagRequest(localeId, giftBagId, giftBagName, prizeId, emailId, giftBagDescription);
			}
		});
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 补偿管理
	//*************************************
	sailCompensationManageLoader : function(){
		if ($("#compensationManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/compensation_manage.html");
			initLoader.sailCommonFunction.inputSet();
			if(publicInit.authenCheck(look._AUTHEN.misSail, 66)){$("#addCompensationCell").show();}
		}
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			location.hash = look.setParam([["locale_id", localeId]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(localeId);
		});
		
		//[事件]新增补偿
		$("#addCompensationSubset").unbind("click").bind("click", function(){
			if($("#localeIdSelect").val() == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 462,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_compensation_poper look_box_corner",
						contentHtml: text
					});
					eval(callback());
				});
			}
			var addCompensationCallback = function(){
				$("#addCompensationEditorPanel").find("input.text:first").focus();
				publicInit.inputTipStyle("#addCompensationEditorPanel textarea, #addCompensationEditorPanel input.text", "#addCompensationEditorPanel label tt");
				datepickerGetter('#startDateInput, #endDateInput', null);
				//补偿类型字典
				look._SAIL_COMPENSATION_DIC_ARRAY == undefined ? Look.prototype._SAIL_COMPENSATION_DIC_ARRAY = new Array() : null;
				look._SAIL_COMPENSATION_DIC_ARRAY.length == 0 ? sailGetDictionaryRequest("compensation", $("#localeIdSelect").val()) : sailCompensationDictionaryCallback.Assay("select");
				//[事件]增加补偿类型
				$(".add_compensation_type_susbet").unbind("click").bind("click", function(){
					$(this).parent(".compensation_type_cell").next().show();
				});
				//[事件]去除补偿类型
				$(".remove_compensation_type_susbet").unbind("click").bind("click", function(){
					$(this).parent(".compensation_type_cell").hide();
				});
				//[事件]确认新增补偿
				$("#comfirmAddCompensationSubset").unbind("click").bind("click", function(){
					if($(this).hasClass("a_as_disabled")){return false;}
					var localeId = $("#localeIdSelect").val(),
						name = $.trim($("#nameInput").val()),
						langObj = $("#addCompensationForm textarea"),
						type = $("select[name='type1']").val(),
						typeKey = $.trim($("input[name='typeKey1']").val()),
						count = $.trim($("input[name='count1']").val()),
						range = $("#rangeSelect").val(),
						start = $("#startDateInput").val(),
						end = $("#endDateInput").val(),
						ifLang = false;
					if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
					if(name == ""){look.showInfo.error(look._I18N_DATA.$541/**请填写标题…**/);$("#nameInput").focus();return false;}
					langObj.each(function(){
						var name = $(this).attr("l_name"), value = $(this).attr("l_value");
						if ($.trim($(this).val()) == "") {
							$(this).next("input:hidden").removeAttr("name").removeAttr("value");
						}else{
							$(this).next("input:hidden").attr("name", name).attr("value", value);
							ifLang = true;
						}
					});
					if(!ifLang){look.showInfo.error(look._I18N_DATA.$545/**至少填写一项语言内容…**/);return false;}
					if(type == 0){look.showInfo.error(look._I18N_DATA.$542/**请选择补偿类型…**/);return false;}
					if(typeKey == ""){look.showInfo.error(look._I18N_DATA.$543/**请填写typeKey…**/);$("input[name='typeKey1']").focus();return false;}
					if(count == ""){look.showInfo.error(look._I18N_DATA.$544/**请填写数量…**/);$("input[name='count1']").focus();return false;}
					if(range == ""){look.showInfo.error(look._I18N_DATA.$443/**请选择类别…**/);return false;}
					if(start == ""){look.showInfo.error(look._I18N_DATA.$473/**开始日期不能为空…**/);$("#startDateInput").focus();return false;}
					if(end == ""){look.showInfo.error(look._I18N_DATA.$474/**结束日期不能为空…**/);$("#endDateInput").focus();return false;}
					sailCreateCompensateRequest(localeId, $("#addCompensationForm").serialize());
					$(this).addClass("a_as_disabled");
				});
			}
			getPoperRequest($(this), "game_account/sail/add_compensation_poper.html?_=" + Math.random() * 100, addCompensationCallback);
		});
		
		if(look._SAIL_USER_INFO.Get_SERVER() == ""){return false;}
		$("#compensationManageList").html('<p class="load_result"><img src="../images/small_loader.gif" /><br/>' + look._I18N_DATA.$629/**查询中…**/ + '</p>');
		sailGetCompensateRequest(look._SAIL_USER_INFO.Get_SERVER());
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 玩家副官信息
	//*************************************
	sailUserCaptainLoader : function(){
		if ($("#sailUserCaptainWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/user_captain.html");
			if(publicInit.authenCheck(look._AUTHEN.misSail, 71)){$("#addCaptainCell").show();}
		}
		initLoader.sailCommonFunction.inputSet();
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val(),
				uid = $.trim($("#userIdInput").val());
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			if(uid == ""){look.showInfo.error(look._I18N_DATA.$462/**请输入玩家ID…**/);$("#userIdInput").focus();return false;}
			location.hash = look.setParam([["locale_id", localeId], ["player_id", uid]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(localeId);
			look._SAIL_USER_INFO.Set_UID(uid);
		});
		
		//[事件]新增副官
		$("#addCaptainSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val(),
				uid = $.trim($("#userIdInput").val()),
				type = $.trim($("#captainTypeInput").val());
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			if(uid == ""){look.showInfo.error(look._I18N_DATA.$462/**请输入玩家ID…**/);$("#userIdInput").focus();return false;}
			if(type == ""){look.showInfo.error(look._I18N_DATA.$547/**请输入要添加的副官类型…**/);$("#captainTypeInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$849/**确定新增副官{word}？**/.replace(/{word}/ig, '<b class="color_yellow">' + type + '</b>') + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					obj.addClass("a_as_disabled");
					sailCreateUserCaptainRequest(localeId, uid, type);
				}
			});
		});
		if(look._SAIL_USER_INFO.Get_SERVER() == "" || look._SAIL_USER_INFO.Get_UID() == ""){return false;}
		sailGetUserCaptainRequest(look._SAIL_USER_INFO.Get_SERVER(), look._SAIL_USER_INFO.Get_UID());
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 普通邮件管理
	//*************************************
	sailEmailManageLoader : function(){
		if ($("#emailManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/email_manage.html");
			initLoader.sailCommonFunction.inputSet();
			if(publicInit.authenCheck(look._AUTHEN.misSail, 35)){$("#addEmailCell").show();}
		}
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			location.hash = look.setParam([["locale_id", localeId]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(localeId);
		});
		
		//[事件]新增普通邮件
		$("#addEmailSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 462,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_common_email_poper look_box_corner",
						contentHtml: text
					});
					eval(callback());
				});
			}
			var addEmailCallback = function(){
				$("#addEmailEditorPanel").find("textarea:first").focus();
				publicInit.inputTipStyle("#addEmailEditorPanel textarea", "#addEmailEditorPanel label tt");
				//[事件]确认新增普通邮件
				$("#comfirmAddEmailSubset").unbind("click").bind("click", function(){
					var localeId = $("#localeIdSelect").val(),
						cnContent = $.trim($("#cnContent").val()),
						enContent = $.trim($("#enContent").val()),
						koContent = $.trim($("#koContent").val());
					if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
					if(!(cnContent != "" || enContent != "" || koContent != "")){look.showInfo.error(look._I18N_DATA.$472/**"所有语言的邮件必须填一项…"**/);$("#cnContent").focus();return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$816/**确定新增本条普通邮件？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							sailCreateModifyCommonEmailRequest(localeId, "", cnContent, enContent, koContent);
						}
					});
				});
			}
			getPoperRequest($(this), "game_account/sail/add_common_email_poper.html", addEmailCallback);
		});
		
		if(look._SAIL_USER_INFO.Get_SERVER() == ""){return false;}
		$("#emailManageList").html('<p class="load_result"><img src="../images/small_loader.gif" /><br/>' + look._I18N_DATA.$629/**查询中…**/ + '</p>');
		sailGetCommonEmailListRequest(look._SAIL_USER_INFO.Get_SERVER());
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 系统邮件管理
	//*************************************
	sailSystemEmailManageLoader : function(){
		if ($("#systemEmailManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/system_email_manage.html");
			initLoader.sailCommonFunction.inputSet();
			if(publicInit.authenCheck(look._AUTHEN.misSail, 40)){$("#addSystemEmailCell").show();}
		}
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			location.hash = look.setParam([["locale_id", localeId]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(localeId);
		});
		
		//[事件]新增系统邮件
		$("#addSystemEmailSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 462,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_system_email_poper look_box_corner",
						contentHtml: text
					});
					eval(callback());
				});
			}
			var addSystemEmailCallback = function(){
				$("#addSystemEmailEditorPanel").find("textarea:first").focus();
				publicInit.inputTipStyle("#addSystemEmailEditorPanel textarea", "#addSystemEmailEditorPanel label tt");
				datepickerGetter('#startDateInput, #endDateInput', null);
				//[事件]确认新增系统邮件
				$("#comfirmAddSystemEmailSubset").unbind("click").bind("click", function(){
					var localeId = $("#localeIdSelect").val(),
						cnContent = $.trim($("#cnContent").val()),
						enContent = $.trim($("#enContent").val()),
						koContent = $.trim($("#koContent").val()),
						startDate = $("#startDateInput").val(),
						endDate = $("#endDateInput").val(),
						startTime = $("#startTimeInput").val(),
						endTime = $("#endTimeInput").val(),
						reg = /^[0,1,2][0-9](:)[0,1,2,3,4,5][0-9](:)[0-9]{2}/;
					if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
					if(!(cnContent != "" || enContent != "" || koContent != "")){look.showInfo.error(look._I18N_DATA.$472/**"所有语言的邮件必须填一项…"**/);$("#cnContent").focus();return false;}
					if(startDate == ""){look.showInfo.error(look._I18N_DATA.$473/**"开始日期不能为空…"**/);$("#startDateInput").focus();return false;}
					if(endDate == ""){look.showInfo.error(look._I18N_DATA.$474/**"结束日期不能为空…"**/);$("#endDateInput").focus();return false;}
					if(startTime == ""){look.showInfo.error(look._I18N_DATA.$475/**"开始时间不能为空…"**/);$("#startTimeInput").focus();return false;}
					if(endTime == ""){look.showInfo.error(look._I18N_DATA.$476/**"结束时间不能为空…"**/);$("#endTimeInput").focus();return false;}
					if(!reg.test(startTime)){look.showInfo.error(look._I18N_DATA.$477/**"开始时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…"**/);$("#startTimeInput").focus();return false;}
					if(!reg.test(endTime)){look.showInfo.error(look._I18N_DATA.$478/**"结束时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…"**/);$("#endTimeInput").focus();return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$817/**确定新增本条系统邮件？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							sailCreateSystemEmailRequest(localeId, cnContent, enContent, koContent, startDate + " " + startTime, endDate + " " + endTime);
						}
					});
				});
			}
			getPoperRequest($(this), "game_account/sail/add_system_email_poper.html", addSystemEmailCallback);
		});
		if(look._SAIL_USER_INFO.Get_SERVER() == ""){return false;}
		$("#systemEmailManageList").html('<p class="load_result"><img src="../images/small_loader.gif" /><br/>' + look._I18N_DATA.$629/**查询中…**/ + '</p>');
		sailGetSystemEmailListRequest(look._SAIL_USER_INFO.Get_SERVER());
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 广告激活信息
	//*************************************
	sailAdstrackerInfoLoader : function(){
		if ($("#sailAdstrackerInfoWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/adstracker_info.html");
			datepickerGetter();
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.AssayGame(look._SAIL_USER_INFO.Get_SERVER() ? look._SAIL_USER_INFO.Get_SERVER() : look.getHashParam("locale_id"));
		}
		var to = look.getHashParam("to") == "" ? look.getLocalDate() : look.getHashParam("to"),
			from = look.getHashParam("from") == "" ? to : look.getHashParam("from");
		$("#dataStart").val(from);
		$("#dataEnd").val(to);
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val(),
				from = $("#dataStart").val(),
				to = $("#dataEnd").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			if(look.getDiffDays(from, to) > 60){look.showInfo.error(look._I18N_DATA.$480/**"只能查询间隔60天内的数据…"**/);return false;}
			location.hash = look.setParam([["locale_id", localeId], ["from", from], ["to", to]], location.hash);
		});
		if(look._SAIL_USER_INFO.Get_SERVER() == ""){return false;}
		sailGetAdstrackerListRequest(look._SAIL_USER_INFO.Get_SERVER(), from, to);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 玩家抽奖信息
	//*************************************
	sailUserLotteryLoader : function(){
		if ($("#sailUserLotteryWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/user_lottery.html");
			contrastDatepickerGetter("#dateInput");
		}
		initLoader.sailCommonFunction.inputSet();
		var date = look.getHashParam("date") == "" ? look.getLocalDate() : look.getHashParam("date");;
		$("#dateInput").val(date);
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val(),
				uid = $.trim($("#userIdInput").val()),
				date = $("#dateInput").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			if(uid == ""){look.showInfo.error(look._I18N_DATA.$462/**请输入玩家ID…**/);$("#userIdInput").focus();return false;}
			location.hash = look.setParam([["locale_id", localeId], ["user_id", uid], ["date", date]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(localeId);
			look._SAIL_USER_INFO.Set_UID(uid);
		});
		if(look._SAIL_USER_INFO.Get_SERVER() == "" || look._SAIL_USER_INFO.Get_UID() == ""){return false;}
		sailGetUserLotteryRequest(look._SAIL_USER_INFO.Get_SERVER(), look._SAIL_USER_INFO.Get_UID(), date);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 活动管理
	//*************************************
	sailActivityManageLoader : function(){
		if ($("#activityManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/activity_manage.html");
			initLoader.sailCommonFunction.inputSet();
			if(look._SAIL_TASK_DIC_ARRAY == undefined){Look.prototype._SAIL_TASK_DIC_ARRAY = null;}
			if(look._SAIL_REWARD_DIC_ARRAY == undefined){Look.prototype._SAIL_REWARD_DIC_ARRAY = null;}
			if(look._SAIL_SERVER_DIC_ARRAY == undefined){Look.prototype._SAIL_SERVER_DIC_ARRAY = null;}
			!look._SAIL_TASK_DIC_ARRAY ? sailGetDictionaryRequest("task") : "";
			!look._SAIL_REWARD_DIC_ARRAY ? sailGetDictionaryRequest("reward") : "";
			!look._SAIL_SERVER_DIC_ARRAY ? sailGetDictionaryRequest("server") : "";
			if(publicInit.authenCheck(look._AUTHEN.misSail, 50)){$("#addActivitySubset").show();}
		}
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			location.hash = look.setParam([["locale_id", localeId]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(localeId);
		});
		//[事件]新增活动
		$("#addActivitySubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 462,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_activity_poper look_box_corner",
						contentHtml: text
					});
					eval(callback());
				});
			}
			var addActivtiyCallback = function(){
				publicInit.inputTipStyle("#addActivtiyForm input, #addActivtiyForm textarea", "#addActivtiyForm label tt");
				datepickerGetter('#startDateInput, #endDateInput', null);
				contrastDatepickerGetter('#removeDateInput', null);
				$(".ui-datepicker").bind("click", function(event){event.stopPropagation();});
				//字典请求
				!look._SAIL_TASK_DIC_ARRAY ? sailGetDictionaryRequest("task") : sailTaskDictionaryCallback.Assay("select");
				!look._SAIL_REWARD_DIC_ARRAY ? sailGetDictionaryRequest("reward") : sailRewardDictionaryCallback.Assay("select");
				//[事件]确认新增活动
				$("#comfirmAddActivitySubset").unbind("click").bind("click", function(){
					var localeId = $("#localeIdSelect").val(),
						startDate = $.trim($("#startDateInput").val()),
						endDate = $.trim($("#endDateInput").val()),
						removeDate = $.trim($("#removeDateInput").val()),
						startTime = $.trim($("#startTimeInput").val()),
						endTime = $.trim($("#endTimeInput").val()),
						removeTime = $.trim($("#removeTimeInput").val()),
						startDateTime = new Date(Date.parse((startDate + " " + startTime).replace(/\-/g,"/"))).getTime(),
						endDateTime = new Date(Date.parse((endDate + " " + endTime).replace(/\-/g,"/"))).getTime(),
						removeDateTime = new Date(Date.parse((removeDate + " " + removeTime).replace(/\-/g,"/"))).getTime(),
						reg = /^[0,1,2][0-9](:)[0,1,2,3,4,5][0-9](:)[0-9]{2}/,
						verifyFlag = true;
					if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
					$("#addActivtiyForm input, #addActivtiyForm select").each(function(){
						if($.trim($(this).val()) == ""){verifyFlag = false;$(this).focus();return false;}
					});
					if(!verifyFlag){look.showInfo.error(look._I18N_DATA.$481/**所有选项都不能为空…**/);return false;}
					if(!reg.test(startTime)){look.showInfo.error(look._I18N_DATA.$477/**开始时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#startTimeInput").focus();return false;}
					if(!reg.test(endTime)){look.showInfo.error(look._I18N_DATA.$478/**结束时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#endTimeInput").focus();return false;}
					if(!reg.test(removeTime)){look.showInfo.error(look._I18N_DATA.$479/**移除时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#removeTimeInput").focus();return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$818/**确定新增该活动？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							sailAddActivityRequest(localeId,  '&startTime=' + startDateTime + '&endTime=' + endDateTime + '&removeTime=' + removeDateTime + '&' +$("#addActivtiyForm").serialize());
						}
					});
				});
			}
			getPoperRequest($(this), "game_account/sail/add_activity_poper.html", addActivtiyCallback);
		});
		if(look._SAIL_USER_INFO.Get_SERVER() == ""){return false;}
		$("#activityManageList").html('<p class="load_result"><img src="../images/small_loader.gif" /><br/>' + look._I18N_DATA.$629/**查询中…**/ + '</p>');
		sailGetActivityListRequest(look._SAIL_USER_INFO.Get_SERVER());
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 公告管理
	//*************************************
	sailNoticeManageLoader : function(){
		if ($("#sailNoticeManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/notice_manage.html");
			initLoader.sailCommonFunction.inputSet();
			if(look._SAIL_GOTO_DIC_ARRAY == undefined){Look.prototype._SAIL_GOTO_DIC_ARRAY = null;}
			if(look._SAIL_SERVER_DIC_ARRAY == undefined){Look.prototype._SAIL_SERVER_DIC_ARRAY = null;}
			!look._SAIL_GOTO_DIC_ARRAY ? sailGetDictionaryRequest("goto") : "";
			!look._SAIL_SERVER_DIC_ARRAY ? sailGetDictionaryRequest("server") : "";
			if(publicInit.authenCheck(look._AUTHEN.misSail, 57)){$("#addNoticeSubset").show();}
		}
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			location.hash = look.setParam([["locale_id", localeId]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(localeId);
		});
		//[事件]新增公告
		$("#addNoticeSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 262,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_notice_poper look_box_corner",
						contentHtml: text
					});
					eval(callback());
				});
			}
			var addNoticeCallback = function(){
				$("body").unbind("click");
				datepickerGetter('#startDateInput, #removeDateInput', null);
				//字典请求
				!look._SAIL_GOTO_DIC_ARRAY ? sailGetDictionaryRequest("goto") : sailGotoDictionaryCallback.Assay("select");
				//[事件]确认新增公告
				$("#comfirmAddNoticeSubset").unbind("click").bind("click", function(){
					var localeId = $("#localeIdSelect").val(),
						startDate = $.trim($("#startDateInput").val()),
						removeDate = $.trim($("#removeDateInput").val()),
						startTime = $.trim($("#startTimeInput").val()),
						removeTime = $.trim($("#removeTimeInput").val()),
						startDateTime = new Date(Date.parse((startDate + " " + startTime).replace(/\-/g,"/"))).getTime(),
						removeDateTime = new Date(Date.parse((removeDate + " " + removeTime).replace(/\-/g,"/"))).getTime(),
						reg = /^[0,1,2][0-9](:)[0,1,2,3,4,5][0-9](:)[0-9]{2}/,
						verifyFlag = true;
					if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
					$("#addNoticeForm input, #addNoticeForm select").each(function(){
						if($.trim($(this).val()) == ""){verifyFlag = false;$(this).focus();return false;}
					});
					if(!verifyFlag){look.showInfo.error(look._I18N_DATA.$481/**所有选项都不能为空…**/);return false;}
					if(!reg.test(startTime)){look.showInfo.error(look._I18N_DATA.$477/**开始时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#startTimeInput").focus();return false;}
					if(!reg.test(removeTime)){look.showInfo.error(look._I18N_DATA.$479/**移除时间格式不正确，应该为 [ xx:xx:xx ] (xx是数字)…**/);$("#removeTimeInput").focus();return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$819/**确定新增该公告？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							sailAddNoticeRequest(localeId,  '&startDate=' + startDateTime + '&removeDate=' + removeDateTime + '&' +$("#addNoticeForm").serialize());
						}
					});
				});
			}
			getPoperRequest($(this), "game_account/sail/add_notice_poper.html", addNoticeCallback);
		});
		if(look._SAIL_USER_INFO.Get_SERVER() == ""){return false;}
		$("#noticeManageList").html('<p class="load_result"><img src="../images/small_loader.gif" /><br/>' + look._I18N_DATA.$629/**查询中…**/ + '</p>');
		sailGetNoticeListRequest(look._SAIL_USER_INFO.Get_SERVER());
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> 打折管理
	//*************************************
	sailOnsaleManageLoader : function(){
		if ($("#sailOnsaleManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/onsale_manage.html");
			initLoader.sailCommonFunction.inputSet();
			if(look._SAIL_GOTO_DIC_ARRAY == undefined){Look.prototype._SAIL_GOTO_DIC_ARRAY = null;}
			if(look._SAIL_SERVER_DIC_ARRAY == undefined){Look.prototype._SAIL_SERVER_DIC_ARRAY = null;}
			!look._SAIL_GOTO_DIC_ARRAY ? sailGetDictionaryRequest("goto") : "";
			!look._SAIL_SERVER_DIC_ARRAY ? sailGetDictionaryRequest("server") : "";
			if(publicInit.authenCheck(look._AUTHEN.misSail, 57)){$("#addNoticeSubset").show();}
		}
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			location.hash = look.setParam([["locale_id", localeId]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(localeId);
		});
		if(look._SAIL_USER_INFO.Get_SERVER() == ""){return false;}
		$("#onsaleManageList").html('<p class="load_result"><img src="../images/small_loader.gif" /><br/>' + look._I18N_DATA.$629/**查询中…**/ + '</p>');
		sailGetOnsaleListRequest(look._SAIL_USER_INFO.Get_SERVER());
	},
	//*************************************
	//* 游戏帐号管理系统 -> 船长 -> OGP管理
	//*************************************
	sailOGPManageLoader : function(){
		if ($("#sailOGPManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/sail/ogp_manage.html");
			var serverId = look._SAIL_USER_INFO.Get_SERVER() ? look._SAIL_USER_INFO.Get_SERVER() : look.getHashParam("server_id");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.AssayGame(serverId);
		}
		$("#siftSubset").unbind("click").bind("click", function(){
			var serverId = $("#localeIdSelect").val();
			if(serverId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			location.hash = look.setParam([["server_id", serverId]], location.hash);
			look._SAIL_USER_INFO.Set_SERVER(serverId);
		});
		//[事件]新增ogp meta
		$("#addOGPCell").unbind("click").bind("click", function(){
			var addOGPMetaEvent = function(){
				//[事件]确认新增
				var name = $.trim($("#nameInput").val()),
					content = encodeURIComponent(look.aceEditor.getValue());
				if(look.aceEditor.getValue() == ""){look.showInfo.error(look._I18N_DATA.$559/**内容不能为空…**/);look.aceEditor.focus();return false;}
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$883/**确认新增OGP meta？**/ + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						sailAddModifyMetaRequest(name, content);
					}
				});
			}
			$.lookPop({
				url: "game_account/sail/add_ogp_meta_poper.html",
				title: look._I18N_DATA.$5122/**新增OGP meta**/,
				closer: false,
				id: "addOGPMetaPoper",
				confirmSubset: true,
				confirmCallback: addOGPMetaEvent,
				cancelSubset: true,
				focusElement: "#nameInput",
				callback: function(){
					publicInit.inputTipStyle("#addOGPMetaPoper input.text", "#addOGPMetaPoper label tt");
					aceEditGetter({id: "addOGPMetaEditor", mode: "html"});
				}
			});
		});
		if(look._SAIL_USER_INFO.Get_SERVER() == ""){return false;}
		sailGetMetaListRequest();
	},
	
	/*** sail_mis预加载 END ***/
	
	/*** empire_mis预加载 START ***/
	
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 公共方法
	//*************************************
	empireCommonFunction : {
		inputSet : function(){
			var userId = look._EMPIRE_USER_INFO.Get_UID() ? look._EMPIRE_USER_INFO.Get_UID() : look.getHashParam("user_id");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.AssayGame();
			$("#userNameInput").val(look.getHashParam("user_name"));
			$("#userIdInput").val(userId);
		},
		siftSubsetEvent : function(callback){
			this.inputSet();
			$("#siftSubset").unbind("click").bind("click", function(){
				var localeId = $("#localeIdSelect").val(),
					userId = $.trim($("#userIdInput").val());
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				if(userId == ""){look.showInfo.error(look._I18N_DATA.$462/**请输入玩家ID…**/);$("#userIdInput").focus();return false;}
				location.hash = look.setParam([["locale_id", localeId], ["user_id", userId]], location.hash);
				look._EMPIRE_USER_INFO.Set_SERVER(localeId);
				look._EMPIRE_USER_INFO.Set_UID(userId);
			});
			if(look._EMPIRE_USER_INFO.Get_SERVER() == "" || look._EMPIRE_USER_INFO.Get_UID() == ""){return false;}
			eval(callback(look._EMPIRE_USER_INFO.Get_UID()));
		},
		siftSubsetEvent1 : function(callback){
			this.inputSet();
			$("#siftSubset").unbind("click").bind("click", function(){
				var localeId = $("#localeIdSelect").val();
				if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
				location.hash = look.setParam([["locale_id", localeId]], location.hash);
				look._EMPIRE_USER_INFO.Set_SERVER(localeId);
			});
			if(look._EMPIRE_USER_INFO.Get_SERVER() == ""){return false;}
			eval(callback());
		}
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 角色信息
	//*************************************
	empireUserInfoLoader : function(){
		if ($("#empireUserInfoWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/user_info.html");
		}
		initLoader.empireCommonFunction.inputSet();
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val(),
				userId = $.trim($("#userIdInput").val()),
				userName = $.trim($("#userNameInput").val());
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			if(userId == "" && userName == ""){look.showInfo.error(look._I18N_DATA.$453/**查询条件必须填一项…**/);$("#userNameInput").focus();return false;}
			location.hash = look.setParam([["locale_id", localeId], ["user_id", userId], ["user_name", userName]], location.hash);
			look._EMPIRE_USER_INFO.Set_SERVER(localeId);
			look._EMPIRE_USER_INFO.Set_UID(userId);
		});
		//[事件]用户名chang事件
		$("#userNameInput").unbind("change").bind("change", function(){
			$("#userIdInput").val("");
		});
		if(look._EMPIRE_USER_INFO.Get_SERVER() == "" || look.getHashParam("user_name") == "" && look._EMPIRE_USER_INFO.Get_UID() == ""){return false;}
		empireGetUserInfoRequest(look.getHashParam("user_name"));
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 英雄信息
	//*************************************
	empireHeroAccountLoader : function(){
		if ($("#heroAccountWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/user_hero.html");
			publicInit.authenCheck(look._AUTHEN.misEmpire, 35) ? $("#unlockAllHeroCell").show() : null;
		}
		initLoader.empireCommonFunction.siftSubsetEvent(empireGetUserHeroRequest);
		initLoader.empireCommonFunction.siftSubsetEvent(empireGetSoulRequest);
		//[事件]解锁全部英雄
		$("#unlockAllHeroSubset").unbind("click").bind("click", function(){
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$878/**确定要为此用户解锁全部英雄？**/ + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(obj){
					if(obj.hasClass("a_as_disabled")){return false;}
					empireUnlockAllHeroRequest();
					obj.addClass("a_as_disabled");
				}
			});
		});
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 装备信息
	//*************************************
	empireEquipmentDataLoader : function() {
		if ($("#equipmentDataWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/user_equipment.html");
		}
		initLoader.empireCommonFunction.siftSubsetEvent(empireGetUserEquipmentRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 家园建筑信息
	//*************************************
	empireHomelandDataLoader : function() {
		if($("#homelandDataWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/user_homeland.html");
		}
		initLoader.empireCommonFunction.siftSubsetEvent(empireGetUserHomelandRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 竞技场信息
	//*************************************
	empireArenaDataLoader : function(){
		if($("#arenaDataWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/user_arena.html");
		}
		initLoader.empireCommonFunction.siftSubsetEvent(empireGetUserArenaRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> pvp信息
	//*************************************
	empirePvpInfoLoader : function(){
		if($("#pvpInfoWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/pvp_info.html");
		}
		initLoader.empireCommonFunction.siftSubsetEvent(empireGetPvpInfoRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 公告管理
	//*************************************
	empireNoticeManageLoader : function(){
		if ($("#empireNoticeManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/notice_manage.html");
		}
		initLoader.empireCommonFunction.inputSet();
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			location.hash = look.setParam([["locale_id", localeId]], location.hash);
			look._EMPIRE_USER_INFO.Set_SERVER(localeId);
		});
		if(look._EMPIRE_USER_INFO.Get_SERVER() == ""){return false;}
		empireGetNoticeRequest();
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 玩家宝石信息
	//*************************************
	empireUserJewelLoader : function() {
		if($("#userJewelWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/user_jewel.html");
		}
		initLoader.empireCommonFunction.siftSubsetEvent(empireGetJewelRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 玩家祝福信息
	//*************************************
	empireUserSpereLoader : function() {
		if($("#userSpereWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/user_spere.html");
		}
		initLoader.empireCommonFunction.siftSubsetEvent(empireGetSpereRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 资源倍率信息
	//*************************************
	empireSystemConfigLoader : function() {
		if($("#systemConfigWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/system_config.html");
		}
		initLoader.empireCommonFunction.siftSubsetEvent1(empireGetSystemConfigRequest);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 活动管理
	//*************************************
	empireActivityManageLoader : function() {
		if($("#empireActivityManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/empire/activity_manage.html");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.AssayGame();
		}
		var params = {};
		$("#uploadSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
		});
		$("#localeIdSelect").bind("change", function(){
			if("" == $(this).val()){
				$("#uploadSubset").show();
			}else{
				$("#uploadSubset").hide();
				look._EMPIRE_USER_INFO.Set_SERVER($(this).val());
			}
		});
		if("" != look._EMPIRE_USER_INFO.Get_SERVER()){$("#uploadSubset").hide();}
		initLoader.picUploadFunction(look._IM10164.url, look._IM10164.getJson(params), function(){
			params = {
				"localeId": look._EMPIRE_USER_INFO.Get_SERVER(),
				"uri": look._EMPIRE_USER_INFO.UPLOAD_URI
			}
			$('#uploadify').uploadifySettings('scriptData', params);
		}, function(response){
			if(response.data && response.code == 0){
				response.data == "ok" ? look.showInfo.right(look._I18N_DATA.$571/**上传成功！**/) : look.showInfo.error(response.data);
			}else{
				look.showInfo.error(response.code + ":" + response.message);
			}
		}, null, null, ["txt", "xls", "xlsx"]);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 帝国 -> 国战排行榜信息
	//*************************************
	empireMultiwarInfoLoader : function(){
		if($("#empireMultiwarInfoWrapper").length == 0) {
			loadPage("#wrapper", "game_account/empire/multiwar_info.html");
			if (publicInit.authenCheck(look._AUTHEN.misEmpire, 33)) {
				$("#resetMultiwarCell").show();
				datepickerGetter("#dateInput", 0);
			}
			publicInit.authenCheck(look._AUTHEN.misEmpire, 31) ? $("#rangTypeSelect option[value='single']").show() : null;
			publicInit.authenCheck(look._AUTHEN.misEmpire, 32) ? $("#rangTypeSelect option[value='total']").show() : null;
		}
		initLoader.empireCommonFunction.inputSet();
		$("#rangTypeSelect option[value='" + look.getHashParam("rang_type") + "']").attr("selected", "selected");
		$("#siftSubset").unbind("click").bind("click", function(){
			var localeId = $("#localeIdSelect").val(),
				rangType = $("#rangTypeSelect").val();
			if(localeId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
			if(rangType == ""){look.showInfo.error(look._I18N_DATA.$443/**请选择类别…**/);return false;}
			location.hash = look.setParam([["locale_id", localeId], ["rang_type", rangType]], location.hash);
			look._EMPIRE_USER_INFO.Set_SERVER(localeId);
		});
		//[事件]重置国战信息
		$("#resetMultiwarSubset").unbind("click").bind("click", function(){
			var date = $("#dateInput").val();
			if(date == ""){look.showInfo.error(look._I18N_DATA.$7020/**请选择重置日期…**/);$("#dateInput").focus();return false;}
			$.lookPop({
				type: 2,
				title: look._I18N_DATA.$66/**提醒**/,
				html:
					'<div style="width:500px;">' +
					'	<div class="pop_content_word">' +
					'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$875/**此操作将重置排行榜到{date}！请谨慎操作！**/.replace(/{date}/ig,  '<b class="color_red">' + date + '</b>') + '</span>' +
					'	</div>' +
					'</div>',
				confirmCallback: function(){
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$703/**重要提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$876/**重置国战操作不可逆，继续吗？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							empireResetMultiwarRequest(date);
							obj.addClass("a_as_disabled");
						}
					});
				}
			});
		});
		if(look._EMPIRE_USER_INFO.Get_SERVER() == "" && look.getHashParam("rang_type") == ""){return false;}
		$("#rangTitleCell").html('<b>' + $("#rangTypeSelect option:selected").text() + '</b>');
		empireGetMultiwarRankRequest(look.getHashParam("rang_type"));
	},
	
	/*** empire_mis预加载 END ***/
	
	/*** game_help预加载 START ***/
	
	//*************************************
	//* 游戏帐号管理系统 -> 游戏活动攻略 -> 活动攻略管理
	//*************************************
	gameHelpDetailManageLoader : function(){
		if($("#gameDetailWrapper").length <=0) {
			loadPage( "#wrapper", "game_account/help/game_detail.html" );
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		$("#pageTypeSelect option[value='" + look.getHashParam("page_type") + "']").attr("selected", "selected");
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val(),
				pageType = $("#pageTypeSelect").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			if(pageType == ""){look.showInfo.error(look._I18N_DATA.$572/**请选择类型…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId], ["page_type", pageType]], location.hash);
		});
		if (publicInit.authenCheck(look._AUTHEN.gameHelp, 10)) {
			//[事件]新增活动攻略
			$("#addGameDetailSubset").unbind("click").bind("click", function(){
				var pageType = $("#pageTypeSelect").val(),
					pageTitle = $("#pageTypeSelect option:selected").text();
				if(pageType == ""){look.showInfo.error(look._I18N_DATA.$572/**请选择类型…**/);return false;}
				var modifyDetailEvent = function(obj){
					var title = $.trim($("#modifyDetailTitleInput").val());
					if(title == ""){look.showInfo.error(look._I18N_DATA.$573/**标题不能为空…**/);$("#modifyDetailTitleInput").focus();return false;}
					if(look.kindEditor.isEmpty()){look.showInfo.error(look._I18N_DATA.$574/**内容不能为空…**/);look.kindEditor.focus();return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						clear: false,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$857/**确认新增{tit1le}？**/.replace(/{title}/ig,  pageTitle + '<b class="color_yellow">' + title + '</b>') + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							gameHelpAddGameDetailRequest(look.getHashParam("appid"), look.getHashParam("server_id"), pageType, title, encodeURIComponent(look.kindEditor.html()));
							obj.addClass("a_as_disabled");
						}
					});
				}
				$.lookPop({
					url: "game_account/help/modify_detail_poper.html",
					title: look._I18N_DATA.$642/**新增**/ + $("#pageTypeSelect option:selected").text(),
					closer: false,
					id: "popAddGameDetailPoper",
					confirmSubset: true,
					confirmCallback: modifyDetailEvent,
					cancelSubset: true,
					focusElement: "#modifyDetailTitleInput",
					callback: function(){
						publicInit.inputTipStyle(".modify_detail_poper_label input", ".modify_detail_poper_label tt");
						kindeditorGetter({
							id: "#editorTextarea"
						});
					}
				});
			});
		}
		if(look.getHashParam("appid") == ""){return false;}
		$("#gamePageLinkCell").html('<a href="' + look._GAME_HELP_ONLINE_URL + '#theme=' + look.getHashParam("page_type") + '&menu=' + look.getHashParam("page_type") + '&appid=' + look.getHashParam("appid") + '&server_id=' + look.getHashParam("server_id") + '" class="blue" target="_blank">' + look._I18N_DATA.$661/**查看**/ + '</a>').parent().fadeIn();
		gameHelpGetGameDetailRequest(look.getHashParam("appid"), look.getHashParam("server_id"), look.getHashParam("page_type"));
	},
	//*************************************
	//* 游戏帐号管理系统 -> 游戏活动攻略 -> 游戏列表管理
	//*************************************
	gameHelpListManageLoader : function(){
		if (!publicInit.authenCheck(look._AUTHEN.gameHelp, 2)) {return false;}
		if ($("#gameListWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/help/game_list.html");
		}
		if (publicInit.authenCheck(look._AUTHEN.gameHelp, 7)) {$("#publishGameListSubset").removeClass("a_as_disabled");}
		if(publicInit.authenCheck(look._AUTHEN.gameHelp, 6)){
			gameHelpGetGameListRequest();
		}
	},
	//*************************************
	//* 游戏帐号管理系统 -> 游戏活动攻略 -> 联系方式管理
	//*************************************
	gameHelpContactManageLoader : function(){
		if (!publicInit.authenCheck(look._AUTHEN.gameHelp, 4)) {return false;}
		if($("#gameContactWrapper").length <=0) {
			loadPage("#wrapper", "game_account/help/game_contact.html");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		if (publicInit.authenCheck(look._AUTHEN.gameHelp, 14)) {$("#publishGameContactSubset").removeClass("a_as_disabled");}
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId]], location.hash);
		});
		if (!publicInit.authenCheck(look._AUTHEN.gameHelp, 13)) {return false;}
		if(look.getHashParam("appid") == ""){return false;}
		gameHelpGetGameContactRequest(look.getHashParam("appid"), look.getHashParam("server_id"));
	},
	//*************************************
	//* 游戏帐号管理系统 -> 游戏活动攻略 -> 数据文件备份
	//*************************************
	gameHelpBackupLoader : function(){
		if($("#gameBackupWrapper").length <=0) {
			loadPage("#wrapper", "game_account/help/game_backup.html");
		}
		if(publicInit.authenCheck(look._AUTHEN.gameHelp, 19)){
			$("#gameBackupCell").show();
			//[事件]备份
			$("#gameBackupSubset").unbind("click").bind("click", function(){
				$.lookPop({
					type: 2,
					title: look._I18N_DATA.$66/**提醒**/,
					html:
						'<div style="width:500px;">' +
						'	<div class="pop_content_word">' +
						'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$858/**确认备份{title}的数据？**/.replace(/{title}/ig, '<b class="color_yellow">' + look._I18N_DATA.$145/**游戏活动攻略**/ + '</b>') + '</span>' +
						'	</div>' +
						'</div>',
					confirmCallback: function(obj){
						if(obj.hasClass("a_as_disabled")){return false;}
						obj.addClass("a_as_disabled");
						gameHelpGameBackupRequest();
					}
				});
			});
		}
		gameHelpGetGameBackupListRequest();
	},
	
	/*** game_help预加载 END ***/
	
	/*** coupon预加载 START ***/
	
	//*************************************
	//* 游戏帐号管理系统 -> 游戏奖励管理 -> 奖励码管理
	//*************************************
	couponManageLoader : function(){
		if($("#couponManageWrapper").length ==0) {
			loadPage("#wrapper", "game_account/coupon/coupon_manage.html");
			if(publicInit.authenCheck(look._AUTHEN.coupon, 3)){$("#couponConditionCell").show();}
			if(look._STAT_INCOME_DIC_ARRAY == undefined){Look.prototype._STAT_INCOME_DIC_ARRAY = new Array();}
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
			look._AGENT_DIC_ARRAY.length == 0 ? getAgentDictionaryRequest() : getAgentDictionaryCallback.Assay();
//			look._STAT_INCOME_DIC_ARRAY.length == 0 ? getIncomeDicRequest() : null;
		}
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				agent = $("#agentSelect").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			if(agent == ""){look.showInfo.error(look._I18N_DATA.$575/**请选择代理商…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["agent", agent]], location.hash);
		});
		//[事件]新增
		$("#addCouponConditionSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 462,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_coupon_condition_poper look_box_corner",
						contentHtml: text
					});
					eval(callback());
				});
			}
			var addCouponConditionCallback = function(){
//				getIncomeDicCallback.AssayChannel();
				getAppInfoDictionaryCallback.Assay();
				$("#addCouponConditionForm input.text:first").focus();
				publicInit.inputTipStyle("#addCouponConditionForm input.text", "#addCouponConditionForm label tt");
				datepickerGetter('#startDateInput, #endDateInput', null);
				//[事件]确认新增
				$("#comfirmAddCouponConditionSubset").unbind("click").bind("click", function(){
					var appId = $("#appIdSelect").val(),
						agent = $("#agentSelect").val(),
//						channel = function(){
//							var arr = new Array();
//							$("#channelCheckbox .selected").each(function(){
//								arr.push($(this).attr("c_id"));
//							});
//							return arr;
//						},
						server = function(){
							var arr = new Array();
							$("#serverIdCheckbox .selected").each(function(){
								arr.push($(this).attr("s_id"));
							});
							return arr;
						}
						ifBlank = false;
					if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
					if(agent == ""){look.showInfo.error(look._I18N_DATA.$575/**请选择代理商…**/);return false;}
					$("#addCouponConditionForm *[required]").each(function(){
						if($.trim($(this).val()) == ""){ifBlank = true;$(this).focus();return false;}
					});
					if(ifBlank){look.showInfo.error(look._I18N_DATA.$576/**所有星号均为必填项…**/);return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$859/**确定创建本条奖励码条件？**/ + '</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
//							createCouponConditionRequest(appId, agent, $("#addCouponConditionForm").serialize() + '&channels=' + channel() + '&servers=' + server());
							createCouponConditionRequest(appId, agent, $("#addCouponConditionForm").serialize() + '&servers=' + server());
						}
					});
				});
			}
			getPoperRequest($(this), "game_account/coupon/add_coupon_condition_poper.html", addCouponConditionCallback);
		});
		if(look.getHashParam("appid") == ""){return false;}
		getCouponConditionListRequest(look.getHashParam("appid"), look.getHashParam("agent"));
	},
	
	/*** coupon预加载 END ***/
	
	/*** web_chat预加载 START ***/
	
	//*************************************
	//* 游戏帐号管理系统 -> 聊天室管理 -> 公共方法
	//*************************************
	webChatDoWebSocketFunction : {
		ws : null,
		app : null,
		scrollFlag : true,
		showTips : {
		    add: function(){
		        $("#webChatTipsPanel").parents("li").remove();
		        $("#messageUl").append('<li><p class="web_chat_tips_panel look_hidden" id="webChatTipsPanel"><span></span></p></li>');
		    },
		    show: function(text){
		        this.add();
		        $("#webChatTipsPanel").fadeIn().children("span").removeClass().html(text);
		        initLoader.webChatDoWebSocketFunction.autoScroll($("#messageUl li:last").height());
		    },
		    right: function(text){
		        this.show(text);
		        $("#webChatTipsPanel span").addClass("right");
		    },
		    error: function(text){
		        this.show(text);
		        $("#webChatTipsPanel span").addClass("error");
		    }
		},
		autoScroll : function(addHeight){
			var theHeight = document.getElementById("messageUl").scrollHeight - parseInt($("#messageUl").height());
			if (!this.scrollFlag) {
				return false;
//				if (theHeight - $("#messageUl").scrollTop() - addHeight > 5) {return false;}
			}
			$("#messageUl").scrollTop(theHeight);
		},
		doSendEvent : function(object){
			if (object.hasClass("a_as_disabled")) {return false;}
            var content = $.trim($("#messageTextarea").val());
            if (look._ADMIN.Get_NAME() == "") {look.showInfo.error(look._I18N_DATA.$577/**无效用户！**/);return false;}
            if (content == "") {look.showInfo.error(look._I18N_DATA.$574/**内容不能为空！**/);$("#messageTextarea").focus();return false;}
			if (look.getByteLen(content) > 500) {look.showInfo.error(look._I18N_DATA.$578/**内容不能超过500字符！**/);return false;}
			this.ws.send(look._IM10155.getJson(look._ADMIN.Get_NAME(), look._ADMIN.uid, look.encodeHtml(content.replace(/"+/g, "|'"))));
			this.scrollFlag = true;
        	$("#messageTextarea").val("");
		},
		doIt : function(){
			var thisObject = this;
			this.ws != null ? this.ws.close() : "";
			this.ws = new WebSocket(getWebChatUrlCallback.Match(thisObject.app) + thisObject.app);
	        this.ws.onopen = function(event){
	            $("#sendSubset").removeClass("a_as_disabled");
				$('#messageUl').html("");
	            thisObject.showTips.show(look._I18N_DATA.$579/**欢迎加入聊天…**/);
	        }
	        this.ws.onmessage = function(event){
	            var message = $('#messageUl'), onClass = "";
	            var back = JSON.parse(event.data);
	            if (back.code == 0) {
	                if (back.data.length != 0) {
	                    $.each(back.data, function(i, list){
	                        message.append(
								'<li' + (list.user.uid == look._ADMIN.uid ? ' class="on"' : '') + '>' +
								'	<p class="message_info"><span class="name">' + list.user.username + '</span>' + (list.user.uid != look._ADMIN.uid ? ' [<a href="javascript:" class="blue uid_subset">' + list.user.uid + '</a>]' : ' [' + list.user.uid + ']')+ '<span class="time">' + list.time + '</span></p>' +
	                        	'	<p class="message_content">' + list.content.replace(/(\|n)/g, "</br>").replace(/(\|t)/g, "&nbsp;").replace(/(\|')/g, "\"") + '</p>' +
	                        	'</li>');
	                    });
						if(back.data.length == 1){
							thisObject.autoScroll(message.children().last().height(), thisObject.scrollFlag);
						}else{//第一次加载获取所有聊天记录时，设置滚动条
							thisObject.autoScroll(message.innerHeight(), true);
						}
						//弹出菜单
						thisObject.getMenu();
	                }
	            } else {
					if(back.code == 503){
						$("#sendSubset").addClass("a_as_disabled");
					}
	                thisObject.showTips.error(back.code + ":" + back.message);
	            }
	        }
	        this.ws.onclose = function(event){
	            thisObject.showTips.error(look._I18N_DATA.$580/**连接断开…**/ + '<a href="javascript:" class="reconnection_subset blue">' + look._I18N_DATA.$657/**重新连接**/ + '</a>');
				reconnectionEventFn();
	        }
	        this.ws.onerror = function(evt){
				thisObject.ws = null;
	            thisObject.showTips.error(look._I18N_DATA.$581/**连接失败…**/ + '<a href="javascript:" class="reconnection_subset blue">' + look._I18N_DATA.$657/**重新连接**/ + '</a>');
				reconnectionEventFn();
	        };
			//[事件]重新连接
			var reconnectionEventFn = function(){
				$(".reconnection_subset").bind("click", function(){
					thisObject.doIt();
				});
				$("#sendSubset").addClass("a_as_disabled");
			}
			//[事件]发送
	        $("#sendSubset").unbind("click").bind("click", function(){thisObject.doSendEvent($(this));});
			$("#messageTextarea").bind("keydown", function(event) {
				event = event ? event : (window.event ? window.event : null);
				if(event.ctrlKey && event.keyCode == 13){thisObject.doSendEvent($("#sendSubset"));return true};
			});
			//[事件]滚动
			$("#messageUl").bind("scroll", function(){
				document.getElementById("messageUl").scrollHeight - parseInt($("#messageUl").height()) - $("#messageUl").scrollTop() < 10 ? thisObject.scrollFlag = true : thisObject.scrollFlag = false;
			});
		},
		getMenu : function(){
			var thisObject = this;
			function getPoperRequest(obj, url, callback){
				$.get(url, function(text){
					$.lookPopDiv({
						container: obj.parent(".message_info"),
						left: obj.position().left,
						addClass: "web_chat_menu_panel",
						top: 20,
						bodyClick: true,
						closer: false,
						remover: ".web_chat_menu_panel",
						contentHtml: text
					});
					callback();
				});
			}
			var menuCallback = function(uid, userName){
				//[事件]弹出禁言操作框
				if (publicInit.authenCheck(look._AUTHEN.webChat, 7)) {
					$("#poperBanSubset").unbind("click").bind("click", function(){
						var obj = $(this);
						$.get("game_account/web_chat/ban_user_poper.html", function(text){
							$.lookPopDiv({
								container: obj.parents(".message_info"),
								left: obj.parents(".message_info").children(".uid_subset").position().left,
								top: 20,
								addClass: "web_chat_ban_user",
								contentHtml: text
							});
							publicInit.inputTipStyle(".web_chat_ban_user input.text", ".web_chat_ban_user label tt");
							$("#poperBanDay").focus();
							//[事件]禁言
							$("#poperBanUserSubset").bind("click", function(){
								var banDay = $.trim($("#poperBanDay").val()),
									banReason = $.trim($("#poperBanReason").val());
								if(banDay == ""){look.showInfo.error(look._I18N_DATA.$582/**禁言天数不能为空…**/);$("#poperBanDay").focus();return false;}
								if(banReason == ""){look.showInfo.error(look._I18N_DATA.$583/**禁言原因不能为空…**/);$("#poperBanReason").focus();return false;}
								if(isNaN(banDay)){look.showInfo.error(look._I18N_DATA.$584/**禁言天数应为数字…**/);$("#poperBanDay").focus();return false;}
								$.lookPop({
									type: 2,
									title: look._I18N_DATA.$66/**提醒**/,
									html: 
										'<div style="width:500px;">' +
										'	<div class="pop_content_word">' +
										'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$860/**确定对用户{name}禁言{day}天？**/.replace(/{name}/ig, '<b class="color_yellow">' + userName + '</b>').replace(/{day}/ig, '<b class="color_red">' + banDay + '</b>') + '</span>' +
										'	</div>' +
										'</div>',
									confirmCallback: function(obj){
										if (obj.hasClass("a_as_disabled")) {return false;}
										webChatBanUserRequest(thisObject.app, uid, banDay, banReason);
										obj.addClass("a_as_disabled");
									}
								});
								$(".pop_dialog_table").bind("click", function(event){event.stopPropagation();});
							});
						});
					}).parent().show();
				}
				//[事件]清除用户发言
				if (publicInit.authenCheck(look._AUTHEN.webChat, 6)) {
					$("#poperClearMessageSubset").bind("click", function(){
						$.lookPop({
							type: 2,
							title: look._I18N_DATA.$862/**注意！此操作不可逆！**/,
							focusElement: ".pop_cancel_subset",
							html: 
								'<div style="width:500px;">' +
								'	<div class="pop_content_word">' +
								'		<span class="pop_content_span pop_warning_icon">' + look._I18N_DATA.$861/**确定清除{name}的所有发言记录？**/.replace(/{name}/ig, '<b class="color_yellow">' + userName + '</b>') + '</span>' +
								'	</div>' +
								'</div>',
							confirmCallback: function(obj){
								if (obj.hasClass("a_as_disabled")) {return false;}
								webChatClearMessageRequest(thisObject.app, uid);
								obj.addClass("a_as_disabled");
							}
						});
						$(".pop_dialog_table").bind("click", function(event){event.stopPropagation();});
					}).parent().show();
				}
			}
			//[事件]弹出操作菜单
			$(".uid_subset").unbind("click").bind("click", function(){
				if (!publicInit.authenCheck(look._AUTHEN.webChat, 3)) {return false;}
				var uid = $(this).text(), userName = $(this).parent(".message_info").children(".name").text();
				$(".web_chat_ban_user").remove();
				getPoperRequest($(this), "game_account/web_chat/menu_poper.html", function(){
					menuCallback(uid, userName);
				});
			});
		}
	},
	//*************************************
	//* 游戏帐号管理系统 -> 聊天室管理 -> 实时监测
	//*************************************
	webChatRealTimeMonitorLoader : function(){
		if (typeof(WebSocket) == "undefined") {
			$("#wrapper").html('<p class="no_result"><br/><br/><img src="../images/warning_icon.png"><br/><br/>' + look._I18N_DATA.$5104/**您的浏览器不支持此功能，请使用以下浏览器以获得支持：**/ + '<br/><br/>[Chrome 5+] [Firefox 4+] [Opera 10.7+] [Safari 5+] [IE 10+]</p>');
			return false;
		}
		if($("realTimeMonitorWrapper").length <=0) {
			loadPage("#wrapper", "game_account/web_chat/real_time_monitor.html");
			$("#messageUl").css("height", parseInt($("#wrapper").innerHeight()) - 92 - parseInt($(".result_title").outerHeight()) - parseInt($(".sift_panel").outerHeight()) - parseInt($("#operateCell").outerHeight()));
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
			if(look._WEB_CHAT_WEBSOCKET_URL == undefined){Look.prototype._WEB_CHAT_WEBSOCKET_URL = new Array();}
			if (publicInit.authenCheck(look._AUTHEN.webChat, 14)) {$("#maintainCell").show();}
		}
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId]], location.hash);
		});
		initLoader.webChatDoWebSocketFunction.showTips.show(look._I18N_DATA.$585/**请选择需要监测的游戏聊天室…**/);
		if(look.getHashParam("appid") == "" || look._ADMIN.uid == null){return false;}
		initLoader.webChatDoWebSocketFunction.app = look.getHashParam("appid") + look.getHashParam("server_id");
		if (getWebChatUrlCallback.Match(initLoader.webChatDoWebSocketFunction.app) === null) {
			getWebChatUrlRequest(look.getHashParam("appid"), look.getHashParam("server_id"));
		}
		
		if (getWebChatUrlCallback.Match(initLoader.webChatDoWebSocketFunction.app) != null) {
			var iframeUrl = getWebChatUrlCallback.Match(initLoader.webChatDoWebSocketFunction.app).replace(/ws/ig, "http").replace(/comet\//ig, "#appid=" + look.getHashParam("appid") + "&server_id=" + look.getHashParam("server_id"));
			look.createBlankIframe(iframeUrl, "webchatIframe", function(){
				//获取权限令牌
				webChatGetTokenRequest(initLoader.webChatDoWebSocketFunction.app, look._ADMIN.uid);
			});
		}
		//获取维护状态
		webChatSystemMaintainRequest(initLoader.webChatDoWebSocketFunction.app, null);
	},
	//*************************************
	//* 游戏帐号管理系统 -> 聊天室管理 -> 屏蔽词管理
	//*************************************
	webChatBanWordsManageLoader : function(){
		if (!publicInit.authenCheck(look._AUTHEN.webChat, 4)) {return false;}
		if ($("#banWordsManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/web_chat/ban_words_manage.html");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		if (publicInit.authenCheck(look._AUTHEN.webChat, 5)) {$("#saveBanWordsSubset").removeClass("a_as_disabled");}
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId]], location.hash);
		});
		
		if(!publicInit.authenCheck(look._AUTHEN.webChat, 2)){return false;}
		if(look.getHashParam("appid") == ""){return false;}
		webChatGetBanWordsRequest(look.getHashParam("appid") + look.getHashParam("server_id"));
	},
	//*************************************
	//* 游戏帐号管理系统 -> 聊天室管理 -> 禁言管理
	//*************************************
	webChatBanUsersManageLoader : function(){
		if (!publicInit.authenCheck(look._AUTHEN.webChat, 9)) {return false;}
		if ($("#banUsersManageWrapper").length <= 0) {
			loadPage("#wrapper", "game_account/web_chat/ban_users_manage.html");
			look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		}
		if (publicInit.authenCheck(look._AUTHEN.webChat, 10)) {$("#saveBanUsersSubset").removeClass("a_as_disabled");}
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				serverId = $("#serverIdSelect").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["server_id", serverId]], location.hash);
		});
		
		if(!publicInit.authenCheck(look._AUTHEN.webChat, 11)){return false;}
		if(look.getHashParam("appid") == ""){return false;}
		webChatGetBanUsersRequest(look.getHashParam("appid") + look.getHashParam("server_id"));
	},
	
	/*** web_chat预加载 END ***/

	/*** app预加载 START ***/
	
	appCommonFn : function(callback){
		look._APP_INFO_DIC_ARRAY.length == 0 ? getAppInfoDictionaryRequest() : getAppInfoDictionaryCallback.Assay();
		appGetAgentListCallback.Check(appGetAgentListCallback.AssaySelect);
		
		$("#siftSubset").unbind("click").bind("click", function(){
			var appId = $("#appIdSelect").val(),
				agent = $("#agentSelect").val();
			if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
			if(agent == ""){look.showInfo.error(look._I18N_DATA.$575/**请选择代理商…**/);return false;}
			location.hash = look.setParam([["appid", appId], ["agent", agent]], location.hash);
		});
		
		if(look.getHashParam("appid") == ""){return false;}
		typeof(callback) == "function" ? callback(look.getHashParam("appid"), look.getHashParam("agent")) : null;
	},
	//*************************************
	//* 应用管理系统 -> 应用下载地址管理
	//*************************************
	appDownloadManageLoader : function(){
		if ($("#appDownloadManageWrapper").length == 0) {
			loadPage("#wrapper", "app/app_download_manage.html");
			if(publicInit.authenCheck(look._AUTHEN.app, 5)){$("#addAppDownloadCell").show();}
		}
		//[事件]新增应用下载地址
		$("#addAppDownloadSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 478,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_app_poper look_box_corner",
						contentHtml: text
					});
					callback();
				});
			}
			var addAppDownloadCallback = function(){
				$("#addAppDownloadPanel").find("input.text:first").focus();
				publicInit.inputTipStyle("#addAppDownloadPanel input.text", "#addAppDownloadPanel label tt");
				//[事件]确认新增应用下载地址
				$("#comfirmAddAppDownloadSubset").unbind("click").bind("click", function(){
					var appId = $("#appIdSelect").val(),
						agent = $("#agentSelect").val(),
						channel, channelSelect = $("#channelSelect").val(),
						channelInput = $.trim($("#channelInput").val()), isUrlEmpty = null;
					$("#addAppDownloadForm input.text").each(function(){
						if($.trim($(this).val()) == ""){isUrlEmpty = $(this);return false;}
					});
					if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
					if(agent == ""){look.showInfo.error("请选择代理商…");return false;}
					if(isUrlEmpty){look.showInfo.error("所有地址都不能为空…");isUrlEmpty.focus();return false;}
					if(channelSelect == ""){
						look.showInfo.error("请选择渠道…");return false;
					} else if (channelSelect == "input"){
						if (channelInput == "") {
							look.showInfo.error("请填写渠道…");$("#channelInput").focus();return false;
						}else{
							channel = channelInput;
						}
					} else {
						channel = channelSelect;
					}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">确认新增本条应用下载地址？</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							appCreateAppDownloadListRequest(appId, agent, channel, "&" + $("#addAppDownloadForm").serialize());
						}
					});
				});
			}
			getPoperRequest($(this), "app/add_app_download_poper.html", addAppDownloadCallback);
		});
		initLoader.appCommonFn(appGetAppDownloadListRequest);
	}, 
	//*************************************
	//* 应用管理系统 -> 分服管理
	//*************************************
	appServerManageLoader : function(){
		if ($("#appServerManageWrapper").length == 0) {
			loadPage("#wrapper", "app/app_server_manage.html");
			if(look._STAT_INCOME_DIC_ARRAY == undefined){Look.prototype._STAT_INCOME_DIC_ARRAY = new Array();}
			if(look._STAT_INCOME_DIC_ARRAY.length == 0){getIncomeDicRequest();}
			if(publicInit.authenCheck(look._AUTHEN.app, 10)){$("#addAppServerCell").show();}
		}
		//[事件]新增分服
		$("#addAppServerSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 478,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_app_poper look_box_corner",
						contentHtml: text
					});
					callback();
				});
			}
			var addAppServerCallback = function(){
				$("#addAppServerPanel").find("input.text:first").focus();
				publicInit.inputTipStyle("#addAppServerPanel input.text", "#addAppServerPanel label tt");
				getAppInfoDictionaryCallback.Assay();
				//[事件]确认新增分服
				$("#comfirmAddAppServerSubset").unbind("click").bind("click", function(){
					var appId = $("#appIdSelect").val(),
						serverId = $("#serverIdSelect").val(),
						agent = $("#agentSelect").val(),
						channel = $("#channelSelect").val(),
						maintenance = $("#maintenanceSelect").val(), isUrlEmpty = null;
					$("#addAppServerForm input.text").each(function(){
						if($.trim($(this).val()) == ""){isUrlEmpty = $(this);return false;}
					});
					if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
					if(agent == ""){look.showInfo.error("请选择代理商…");return false;}
					if(isUrlEmpty){look.showInfo.error("所有地址都不能为空…");isUrlEmpty.focus();return false;}
					if(channel == ""){look.showInfo.error("请选择渠道…");return false;}
					if(maintenance == ""){look.showInfo.error("请选择是否维护…");return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">确认新增此分服？</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							appCreateAppServerRequest(appId, serverId, agent, channel, "&" + $("#addAppServerForm").serialize());
						}
					});
				});
			}
			getPoperRequest($(this), "app/add_app_server_poper.html", addAppServerCallback);
		});
		initLoader.appCommonFn(appGetAppServerRequest);
	},
	//*************************************
	//* 应用管理系统 -> 版本管理
	//*************************************
	appVersionManageLoader : function(){
		if ($("#appVersionManageWrapper").length == 0) {
			loadPage("#wrapper", "app/app_version_manage.html");
			if(publicInit.authenCheck(look._AUTHEN.app, 17)){$("#addAppVersionCell").show();}
		}
		//[事件]新增版本
		$("#addAppVersionSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 278,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_app_version_poper add_app_poper look_box_corner",
						contentHtml: text
					});
					callback();
				});
			}
			var addAppVersionCallback = function(){
				$("#addAppVersionPanel").find("input.text:first").focus();
				publicInit.inputTipStyle("#addAppVersionPanel input.text", "#addAppVersionPanel label tt");
				//[事件]确认新增版本
				$("#comfirmAddAppVersionSubset").unbind("click").bind("click", function(){
					var appId = $("#appIdSelect").val(),
						agent = $("#agentSelect").val(),
						channel = $("#channelSelect").val(), isEmpty = null;
					$("#addAppVersionForm input.text").each(function(){
						if($.trim($(this).val()) == ""){isEmpty = $(this);return false;}
					});
					if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
					if(agent == ""){look.showInfo.error("请选择代理商…");return false;}
					if(channel == ""){look.showInfo.error("请选择渠道…");return false;}
					if(isEmpty){look.showInfo.error("所有选项都不能为空…");isEmpty.focus();return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">确认新增此版本？</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							appCreateAppVersionRequest(appId, agent, channel, "&" + $("#addAppVersionForm").serialize());
						}
					});
				});
			}
			getPoperRequest($(this), "app/add_app_version_poper.html", addAppVersionCallback);
		});
		initLoader.appCommonFn(appGetAppVersionRequest);
	},
	//*************************************
	//* 应用管理系统 -> 广告配置
	//*************************************
	appAdConfigLoader: function(){
		if ($("#appAdConfigWrapper").length == 0) {
			loadPage("#wrapper", "app/app_ad_config.html");
			if (publicInit.authenCheck(look._AUTHEN.app, 22)) {$("#addAppAdConfigCell").show();}
		}
		//[事件]新增广告配置
		$("#addAppAdConfigSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 278,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_app_poper add_app_ad_config_poper look_box_corner",
						contentHtml: text
					});
					callback();
				});
			}
			var addAppAdConfigCallback = function(){
				$("#addAppAdConfigPanel").find("input.text:first").focus();
				appGetAdvertiserDictionaryCallback.Check(appGetAdvertiserDictionaryCallback.AssaySelect);
				//[事件]确认新增广告配置
				$("#comfirmAddAppAdConfigSubset").unbind("click").bind("click", function(){
					var appId = $("#appIdSelect").val(),
						agent = $("#agentSelect").val(),
						channel = $("#channelSelect").val(), isEmpty = null;
					$("#addAppAdConfigForm").find("select, input.text").each(function(){
						if($.trim($(this).val()) == ""){isEmpty = $(this);return false;}
					});
					if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
					if(agent == ""){look.showInfo.error("请选择代理商…");return false;}
					if(channel == ""){look.showInfo.error("请选择渠道…");return false;}
					if(isEmpty){look.showInfo.error("所有选项都不能为空…");isEmpty.focus();return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">确认新增此广告配置？</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							appCreateAppAdConfigRequest(appId, agent, channel, "&" + $("#addAppAdConfigForm").serialize());
						}
					});
				});
			}
			getPoperRequest($(this), "app/add_app_ad_config_poper.html", addAppAdConfigCallback);
		});
		initLoader.appCommonFn(appGetAppAdConfigRequest);
	},
	//*************************************
	//* 应用管理系统 -> 资源管理
	//*************************************
	appResourceManageLoader: function(){
		if ($("#appResourceManageWrapper").length == 0) {
			loadPage("#wrapper", "app/app_resource_manage.html");
			if (publicInit.authenCheck(look._AUTHEN.app, 27)) {$("#addAppResourceCell").show();}
		}
		//[事件]新增&修改资源数据
		$("#addModifyAppResourceSubset").unbind("click").bind("click", function(){
			function getPoperRequest(obj, url, callback){
				var offLeft = obj.offset().left + obj.width() - 478,
					offTop = obj.offset().top + 26;
				$.get(url, function(text){
					$.lookPopDiv({
						left: offLeft,
						top: offTop,
						addClass: "add_app_poper look_box_corner",
						contentHtml: text
					});
					callback();
				});
			}
			var addModifyAppResourceCallback = function(){
				getAppInfoDictionaryCallback.Assay();
				aceEditGetter({id: "appResourceEditor",callback: function(){
					//[事件]自动格式化
					look.aceEditor.on("blur", function(){
						look.aceEditor.setValue(look.JSONFormat(decodeURIComponent(look.aceEditor.getValue()), false));
					});
				}});
				//[事件]确认新增&修改资源数据
				$("#publishAppResourceSubset").unbind("click").bind("click", function(){
					if($(this).hasClass("a_as_disabled")){return false;}
					var appId = $("#appIdSelect").val(),
						serverId = $("#serverIdSelect").val(),
						agent = $("#agentSelect").val(),
						channel = $("#channelSelect").val(),
						appResourceData = encodeURIComponent(look.JSONFormat(look.aceEditor.getValue(), true));
					if(look.aceEditor.getValue() == ""){look.showInfo.error("内容不能为空…");look.aceEditor.focus();return false;}
					if(appId == ""){look.showInfo.error(look._I18N_DATA.$432/**请选择游戏…**/);return false;}
					if(serverId == ""){look.showInfo.error(look._I18N_DATA.$435/**请选择分服…**/);return false;}
					if(agent == ""){look.showInfo.error("请选择代理商…");return false;}
					if(channel == ""){look.showInfo.error("请选择渠道…");return false;}
					$.lookPop({
						type: 2,
						title: look._I18N_DATA.$66/**提醒**/,
						html:
							'<div style="width:500px;">' +
							'	<div class="pop_content_word">' +
							'		<span class="pop_content_span pop_warning_icon">确认修改此资源数据？</span>' +
							'	</div>' +
							'</div>',
						confirmCallback: function(obj){
							if(obj.hasClass("a_as_disabled")){return false;}
							obj.addClass("a_as_disabled");
							appModifyAppResourceRequest(appId, serverId, agent, channel, appResourceData);
						}
					});
				});
			}
			getPoperRequest($(this), "app/add_modify_app_resource_poper.html", addModifyAppResourceCallback);
		});
		initLoader.appCommonFn(appGetAppResourceRequest);
	},

	/*** app预加载 END ***/
	
	/*** apple_top预加载 START ***/
	
	//*************************************
	//* Apple排行系统 -> iTunes Store排行榜
	//*************************************
	appleCommonFn: {
		AssaySelect: function(){
			var countriesSelect = $("#countriesSelect"), storesSelect = $("#storesSelect"), feedTypeSelect = $("#feedTypeSelect"), genreSelect = $("#genreSelect");
			for(var x in look._APPLE_TOP_COUNTRIES_DIC){
				var flag = false;
				$.each(look._APPLE_TOP_SEARCH_CONDITION_DIC.countries, function(k, o){
					if(x == o){flag = true;return false;}
				});
				flag ? countriesSelect.append('<option value="' + x + '">' + look._APPLE_TOP_COUNTRIES_DIC[x] + '</option>') : null;
			}
			//[事件]
			countriesSelect.unbind("change").bind("change", function(){
				countriesChangeFn($(this).val());
				storeChangeFn(storesSelect.val());
			}).children("option[value='" + (look.getHashParam("country") == "" ? "cn" : look.getHashParam("country")) + "']").attr("selected", "selected").parents(".look_hidden").show();
			storesSelect.unbind("change").bind("change", function(){
				storeChangeFn($(this).val());
			});
			
			var storesAssayFn = function(storeValue){
				var storesArray = new Array();
				$.each(look._APPLE_TOP_FEED_TYPES_DIC, function(i, stores){
					if(stores.store == storeValue){
						storesArray.push(stores.translation_key);
					}
				});
				return storesArray;
			}
			var mediaTypeAssayFn = function(mediaType){
				for(var mt in look._APPLE_TOP_MEDIA_TYPES_DIC){
					if(mt == mediaType){
						return look._APPLE_TOP_MEDIA_TYPES_DIC[mt];
					}
				}
			}
			var countriesChangeFn = function(countryValue){
				storesSelect.html("").parents(".look_hidden").show();
				$.each(look._APPLE_TOP_STORE_DIC, function(i, n){
					if(n.country_code == countryValue){
						for (var x in n.stores) {
							if (n.stores[x]) {
								$.map(storesAssayFn(x), function(m){
									var flag = false;
									$.each(look._APPLE_TOP_SEARCH_CONDITION_DIC.stores, function(k, o){
										if(o == m){flag = true;return false;}
									});
									flag ? storesSelect.append('<option value="' + m + '"' + (look.getHashParam("store") == m ? " selected" : "") + '>' + mediaTypeAssayFn(m) + '</option>') : null;
								});
							}
						}
						return false;
					}
				});
			}
			var storeChangeFn = function(storeValue){
				feedTypeSelect.html("").parents(".look_hidden").show();
				genreSelect.html("").parents(".look_hidden").show();
				$.each(look._APPLE_TOP_FEED_TYPES_DIC, function(i, n){
					if(n.translation_key == storeValue){
						$.each(n.feed_types, function(j, m){
							var flag = false;
							$.each(look._APPLE_TOP_SEARCH_CONDITION_DIC.feedTypes, function(k, o){
								if(o == m.translation_key){flag = true;return false;}
							});
							flag ? feedTypeSelect.append('<option value="' + m.translation_key + '"' + (look.getHashParam("feed_type") == m.translation_key ? " selected" : "") + '>' + mediaTypeAssayFn(m.translation_key) + '</option>') : null;
						});
						$.each(n.subgenres, function(j, m){
							var flag = false;
							$.each(look._APPLE_TOP_SEARCH_CONDITION_DIC.genre, function(k, o){
								if(o == m.id){flag = true;return false;}
							});
							flag ? genreSelect.append('<option value="' + m.id + '"' + (look.getHashParam("genre") == m.id ? " selected" : "") + '>' + mediaTypeAssayFn(m.translation_key) + '</option>') : null;
						});
					}
				});
			}
			countriesChangeFn(look.getHashParam("country") == "" ? "cn" : look.getHashParam("country"));
			storeChangeFn(look.getHashParam("store") == "" ? storesSelect.val() : look.getHashParam("store"));
		}
	},
	appleItunesStoreTopLoader: function(){
		if ($("#appleItunesStoreTopWrapper").length == 0) {
			loadPage("#wrapper", "apple_top/itunes_store_top.html");
			appleGetSearchConditionCallback.Check();
			appleGetMediaTypesDictionaryCallback.Check();
			appleGetFeedTypesCallback.Check();
			appleGetStoreCallback.Check();
			appleGetCountriesDictionaryCallback.Check();
			initLoader.appleCommonFn.AssaySelect();
		}
		var maxDate = look.dateFormat(look.reduceDaysByDate(look.getLocalDate(), 0), "yyyy-MM-dd");
		datepickerGetter("#dateInput", maxDate);
		$("#dateInput").val(look.getHashParam("date") == "" ? look.getLocalDate() : look.getHashParam("date"));
		$("#countSelect option[value='" + look.getHashParam("count") + "']").attr("selected", "selected");
		$("#siftSubset").unbind("click").bind("click", function(){
			var country = $.trim($("#countriesSelect").val()),
				store = $.trim($("#storesSelect").val()),
				feedType = $("#feedTypeSelect").val(),
				genre = $("#genreSelect").val(),
				count = $("#countSelect").val(),
				date = $("#dateInput").val();
			location.hash = look.setParam([["country", country], ["store", store], ["feed_type", feedType], ["genre", genre], ["date", date], ["count", count]], location.hash);
		});
		if(look.getHashParam("country") == ""){return false;}
		appleGetITunesStoreTopRequest(look.getHashParam("country"), look.getHashParam("feed_type"), look.getHashParam("genre"), look.getHashParam("date"), look.getHashParam("count"));
	}
	
	/*** apple_top预加载 END ***/
}